About the URL Encoder/Decoder
The URL Encoder/Decoder converts text to and from percent-encoding, the format URLs use for spaces, symbols, and non-ASCII characters. Choose Encode or Decode, paste your text, and the converted result appears as you type.
How it works
Component mode uses encodeURIComponent and also encodes ! ' ( ) * so the output follows RFC 3986 strictly: every character except letters, digits and - _ . ~ becomes its UTF-8 bytes written as %XX. Full URL mode uses encodeURI, which keeps : / ? # & = so a whole address still works. Form mode is like component mode but writes spaces as +, matching HTML form submissions.
Decode mode uses decodeURIComponent and, by default, turns + into a space first. If the input contains a % that is not followed by a valid two-digit hex code, or bytes that aren't valid UTF-8, an error explains the problem. When the input or result is an http or https URL, it is broken into its parts and every query parameter is listed with its decoded value.
How to use
- 1
Choose Encode or Decode.
- 2
Paste the text or URL into the box.
- 3
Pick Component, Full URL or Form when encoding, or whether + means a space when decoding.
- 4
Copy the result, or click Swap to run it back the other way. Your options are kept in the page link.
Worked examples
Query string value
Encoding form values with spaces and an ampersand.
Because the whole string is treated as one value, = and & are encoded too. Encode each value separately if you want to keep them as separators.
Nested URL
Passing a URL as a redirect parameter.
Decoding
Reading an encoded path segment.
Frequently asked questions
Why do URLs need encoding?+
Characters like spaces, &, ?, and # have special meaning in a URL or are not allowed at all, so they must be written as percent-encoded sequences to be sent safely.
What does %20 mean?+
It is the percent-encoded form of a space character: % followed by 20, the hexadecimal code for a space.
Why did https:// get encoded too?+
Component mode encodes : and / as well, because it's meant for a single value. Choose Full URL to encode a whole address while keeping it working.
Why do I see an error when decoding?+
The text contains a % that is not followed by two valid hex digits, or a byte sequence that is not valid UTF-8. The error message explains this.
Does it handle accented characters and emoji?+
Yes. They are converted to UTF-8 bytes and percent-encoded, and decoded back the same way.