How to use URL encode and decode
- Choose Encode a value, Encode a whole URL, or Decode.
- Type or paste. The result updates as you type.
- Copy the result.
Encoding a value
A URL reserves certain characters for its structure: ? starts the query, & separates parameters, = joins a name to its value, / separates path segments and # starts the fragment. When a value contains any of these, or spaces and non-English letters, it must be percent-encoded so it isn't mistaken for structure. Encode a value does exactly that, the same way JavaScript's encodeURIComponent does: "Tom & Jerry" becomes Tom%20%26%20Jerry.
Encoding a whole URL
Encode a whole URL keeps the structural characters and escapes only what is never allowed, such as spaces and accented letters. Use it to fix an address pasted from a document, like a link with spaces in its path. Don't use it on single values: it would leave & and = unescaped and change the meaning of the query.
Decoding
Decode turns %20 back into a space and %C3%A9 back into é, and treats + as a space, as HTML forms do. If an escape is broken, such as a % followed by something other than two hex digits, the tool says at which character instead of failing silently. That's handy when debugging a link that a server rejects.
Everything happens in your browser as you type. URLs often carry tokens and personal data in their query strings, and nothing you paste here is saved or sent.
Common uses
Building a query string by hand, reading a tracking link, debugging a redirect parameter, preparing a mailto: link with a subject line, or checking how a form submitted a value with special characters.
Examples
The value a b&c=d becomes a%20b%26c%3Dd when encoded as a value, so a link like /search?q=a%20b%26c%3Dd keeps the whole phrase as one parameter. The address https://example.com/my file.pdf becomes https://example.com/my%20file.pdf when encoded as a whole URL, with its slashes and colon untouched. Decoding either result gives back exactly what you started with.
Questions
- Value or whole URL: which do I need?
- Encode a value for one query parameter or path segment: it escapes & = / ? and everything else that would break the URL. Encode a whole URL to fix spaces and accents in an address while keeping its structure.
- Why does + turn into a space when decoding?
- In query strings from HTML forms, + means a space. Decoding follows that convention.
- Is anything sent anywhere?
- No. Encoding and decoding happen in your browser as you type.