URL Encoder / Decoder
Encode or decode URLs and query strings using encodeURIComponent. See exactly which characters were encoded and why.
0 chars
0 chars
Characters Encoded
What is URL Encoder / Decoder?
URL encoding (percent-encoding) converts characters that are not allowed in URLs into a % followed by two hexadecimal digits. This tool encodes and decodes URL components using the encodeURIComponent standard, which is safe for query string values and path segments.
How to use
- 1 Type or paste text into the left textarea.
- 2 Click 'Encode →' to percent-encode special characters.
- 3 To decode, paste an encoded URL into the right textarea and click '← Decode'.
- 4 The encoded characters panel shows which specific characters were transformed.
- 5 All processing is done locally in your browser.
Formula
Example calculation
The string 'hello world & more=fun' encodes to 'hello%20world%20%26%20more%3Dfun'. Spaces become %20, & becomes %26, = becomes %3D.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and leaves characters like /, ?, #, & intact. encodeURIComponent encodes everything except unreserved characters — use it for individual query parameter values.
Why does space become %20 and not +?
Both %20 and + represent spaces in URLs, but they are used in different contexts. %20 is standard (RFC 3986). The + sign is used in application/x-www-form-urlencoded encoding (HTML forms).
What characters don't need encoding?
Unreserved characters never need encoding: letters (A-Z, a-z), digits (0-9), and the symbols - _ . ~ These are safe in any URL context.
What is %20?
%20 is the percent-encoded representation of a space character. The hex value of ASCII space (32) is 20, so it encodes as %20.
Can I use this to decode a full URL?
Use the decode direction to decode individual components. Decoding a full URL with encoded path segments or query strings works fine with this tool.