What is URL encoding?
URL encoding — also called percent-encoding — replaces characters that have a reserved meaning in a URL, or that cannot appear in one at all, with a % followed by their byte value in hexadecimal. A space becomes %20, a slash becomes %2F, and non-ASCII text is first converted to UTF-8 bytes and then escaped byte by byte.
There is no single correct way to encode a URL, which is where most bugs come from. Escaping a whole address the way you would escape one query value destroys the address; escaping one value the way you would escape a whole address leaves & and = intact and silently splits your parameter in two. This tool keeps the three rules as separate modes so you pick the one that matches where the text is going.
A percent-encoding mechanism is used to represent a data octet in a component when that octet\u2019s corresponding character is outside the allowed set or is being used as a delimiter of, or within, the component.
Features
- Three encoding rules, kept apart
- Encode component escapes everything reserved, for a single query value or path segment. Encode full URL leaves the structural characters : / ? # [ ] @ & = + $ , alone. Form encoding follows application/x-www-form-urlencoded, where a space becomes + rather than %20.
- Decoding that accepts both space conventions
- The decoder turns + back into a space before unescaping, so values copied out of a form submission or a query string decode correctly either way.
- UTF-8 aware
- Non-ASCII text is encoded as UTF-8 bytes, which is what browsers and servers expect. Korean, accented Latin, and emoji all round-trip.
- Clear failures
- A truncated or malformed escape sequence produces an explicit error rather than a partially decoded string.
How to use
- 1
Decide what you are encoding
One value that will sit inside a URL, or an entire URL? The answer picks the mode.
- 2
Choose the matching mode
Encode component for a single query parameter or path segment, Encode full URL for a whole address, Encode (form) for an HTML form body.
- 3
Paste the text
The result updates as you type.
- 4
Decode in the other direction
Switch to Decode to turn percent-encoded text back into readable characters.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent escapes every reserved character, including / ? & = and #, so it is correct for a single value that goes inside a URL. encodeURI leaves those characters alone because they give a URL its structure, so it is correct for escaping an entire address. Using encodeURI on a query value is the most common cause of parameters that break when they contain an ampersand.
Why does a space sometimes become %20 and sometimes +?
%20 is the percent-encoding of a space and is valid anywhere in a URL. The + convention comes from application/x-www-form-urlencoded, the format HTML forms use for submissions, where + means a space and a literal plus must be written %2B. Decoders that ignore this turn a form-submitted space into a plus sign.
Do I need to encode Korean or other non-ASCII text in a URL?
For transmission, yes — the characters are converted to UTF-8 bytes and each byte is percent-escaped. Browsers display the decoded form in the address bar, which is why a URL can look like plain Korean while the request on the wire is fully escaped.
Is it safe to encode the same string twice?
No. Double encoding turns % into %25, so %20 becomes %2520 and the value arrives with literal escape sequences in it. If a value already looks encoded, decode it first and check before encoding again.
Is my input sent anywhere?
No. Encoding and decoding run in JavaScript on your own device, and the page has no backend that receives what you type.
Specifications this follows
- RFC 3986 — Uniform Resource Identifier (URI): Generic Syntax — Defines reserved characters and percent-encoding — the reason a whole URL and a single value need different rules.
- WHATWG URL Standard — application/x-www-form-urlencoded — Defines the form-encoding rule where a space becomes + and a literal plus becomes %2B.
- MDN — encodeURIComponent() — Lists exactly which characters each function escapes.
Related tools
- Base64 Encoder / DecoderEncode text to Base64 or decode it back. Handles UTF-8, emoji, and URL-safe variants.
- JSON ViewerValidate, format, and explore JSON as a tree or a table. Large API responses stay foldable.
- JWT DecoderSplit a JSON Web Token into header, claims, and signature — with expiry read as a real time.