How to use the URL Encode & Decode
- 1 Choose Encode or Decode.
- 2 Paste the text or URL component.
- 3 Copy the result into your link, code or browser.
Why URLs need encoding
URLs may only contain a limited set of ASCII characters. Spaces, accented letters and characters with a special meaning – such as &, =, ?, / and # – must be percent-encoded when they appear inside a value. Each byte is written as % followed by two hexadecimal digits: a space becomes %20 and é becomes %C3%A9 (its two UTF-8 bytes).
Encoding a query parameter
Suppose you build a search link for the phrase fish & chips. Without encoding, ?q=fish & chips breaks the query at the &. Encoded, it becomes ?q=fish%20%26%20chips and arrives intact.
This tool encodes like JavaScript's encodeURIComponent: letters, digits and - _ . ! ~ * ' ( ) stay as they are, everything else is encoded. That is the right choice for individual parameter values and path segments.
Decoding
Paste an encoded string to make it readable again, for example to inspect tracking links or redirect URLs. Enable Treat “+” as space for data from HTML forms (application/x-www-form-urlencoded), where spaces are sent as +. Malformed sequences such as a lone % are reported instead of silently producing broken text.
Frequently asked questions
What is the difference between %20 and + for spaces?
Both can represent a space. %20 is the standard percent-encoding used in URLs; + is used in HTML form submissions. Enable “Treat + as space” when decoding form data.
Should I encode a complete URL?
No. Encode only the individual parts, such as a query parameter value. Encoding a full URL would also encode the “://” and “/” separators.
Why do I get an error when decoding?
The input contains an invalid sequence, such as a “%” not followed by two hexadecimal digits, or bytes that do not form valid UTF-8.
Last updated: