URL Encode & Decode
EncodingEverything runs locally in your browser — nothing is uploaded
Convert text to percent-encoding and back. The two available methods differ in exactly eleven characters: encodeURIComponent turns & into %26 while encodeURI leaves it alone. Use the first for parameter values — an unescaped & or = inside a value gets read as a separator, silently splitting it into extra parameters — and the second for a whole URL, where :// ? & = # are structure rather than data. Choosing the wrong one never throws; it just produces a link that breaks for someone else, which is why the choice is explicit here. When decoding fails you also get the reason: a truncated escape, or bytes that were never UTF-8.
Features
- Both directions: text ⇄ percent-encoding
- Choose encodeURIComponent for parameter values or encodeURI for a whole URL
- CJK, spaces and emoji encoded as UTF-8, matching what browsers put in the address bar
- Decoding errors distinguish a truncated escape from bytes that are not UTF-8
- Never treats + as a space — that rule belongs to form encoding, not percent-encoding
- Results update as you type — no button to press
How to use
- Pick the direction: encode or decode
- Choose the scope: a parameter value or a whole URL
- Paste your content — the result appears instantly
- Click Copy to take the result
FAQ
- Which one should I use?
- One rule covers it: encodeURI for a full URL, encodeURIComponent for a single parameter value. They differ only on ; , / ? : @ & = + $ # — encodeURI keeps those because the URL structure depends on them, while encodeURIComponent escapes them. Running a whole URL through encodeURIComponent escapes the :// as well and leaves you with an address that no longer opens.
- Why is %3F still escaped after decoding?
- Because the scope is set to encodeURI. Its counterpart decodeURI deliberately leaves reserved characters escaped: %3F means "a literal ? inside the data", and turning it back into ? would change what the URL means. Switch to encodeURIComponent to decode those too.
- Why is a space %20 and not +?
- A space is %20 in percent-encoding. The + shorthand comes from HTML form submission (application/x-www-form-urlencoded), which is a different scheme. This tool follows percent-encoding and will not turn + into a space.
- What does "the bytes are not valid UTF-8" mean?
- The escapes are structurally fine, but the bytes they produce are not valid UTF-8 — usually because the link came from an older system using GBK or Latin-1. The character U+4F60 is %C4%E3 in GBK but %E4%BD%A0 in UTF-8, and this tool will not guess which one you meant.
Related tools
UTF-8 Viewer
EncodingSee a text as UTF-8 bytes, code points, percent-encoding, HTML entities and escapes side by side, with character and byte counts kept apart.
URL Parser
WebParse a URL into scheme, host, port, path, query parameters and fragment, with each parameter shown raw and decoded. Runs entirely in your browser.
Base64
EncodingConvert text to Base64 and back, with correct UTF-8 handling for accents, CJK and emoji. Runs entirely in your browser — nothing is uploaded.
HTML Entities
EncodingTurn < > & and quotes into HTML entities and decode them back in a single pass, so &lt; becomes <, not an angle bracket. Runs in your browser.
JWT Decoder & Verifier
EncodingDecode a JWT and verify an HS256, HS384 or HS512 signature with your secret, reading exp and nbf as dates. All local to your browser.
Unicode Escape
EncodingConvert non-ASCII text and emoji into \uXXXX or \xXX escapes and back, with emoji written as proper surrogate pairs. Runs entirely in your browser.