URL Encoder / Decoder
Percent-encode URLs or decode %xx sequences — converts instantly as you type
Output will appear here
Paste or type on the left
Percent-encode URLs or decode %xx sequences — converts instantly as you type
Output will appear here
Paste or type on the left
Percent-encode special characters in a URL or decode %xx sequences back to readable text
with our free online URL encoder decoder.
Conversion happens in real time as you type — no button clicks needed.
All processing runs entirely in your browser —
your data never leaves your device.
%xx sequences back to characters/, ?, #)
URL encoding (also called percent encoding) converts characters that are not allowed or have
special meaning in a URL into a safe representation. Each unsafe character is replaced by
a % followed by two hexadecimal digits representing the character's byte value in UTF-8.
For example, a space becomes %20, and an equals sign becomes %3D.
URLs can only contain a limited set of characters from the ASCII character set. Any character outside that set — including spaces, accented letters, emoji, and many punctuation marks — must be percent-encoded before being included in a URL. This is essential when constructing query strings, passing data in path segments, or embedding values in API requests.
Plain text input:
hello world & foo=bar
URL encoded output (Component):
hello%20world%20%26%20foo%3Dbar
URL encoded output (URI):
hello%20world%20&%20foo=bar
Encoded input:
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world
Decoded output:
https://example.com/search?q=hello world
JavaScript provides two built-in functions for URL encoding, and they differ in what they leave untouched:
A–Z, a–z, 0–9, -, _, ., ~).
Use this for individual query parameter values — it encodes &, =, +, ?, and #, which prevents them from being misinterpreted as URL structure.
; / ? : @ & = + $ , #.
Use this to encode a complete URL while keeping its structure intact.
When in doubt, use Component mode for query string values and form data. Use URI mode only when encoding a full URL and you want to preserve slashes and other structural characters.
%20 is the percent-encoded representation of a space character. The hex value 20 is the ASCII code for space. You'll also see + used for spaces in query strings (HTML form encoding), but percent-encoding with %20 is unambiguous and universally supported.&, =, #, and spaces will be misinterpreted as URL structure, breaking the request or silently passing the wrong value.%xx percent sequences for special characters in URLs. HTML encoding uses named entities like & and < for characters with special meaning in HTML. They solve different problems — use URL encoding for query strings and path segments, HTML encoding for text inside HTML documents.A–Z, a–z), digits (0–9), and the four symbols - _ . ~. Everything else should be percent-encoded when used in a context where it might be misinterpreted.