URL Encode & Decode
Encoding & CryptoEverything 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
URL Parser
Web & NetworkParse a URL into scheme, host, port, path, query parameters and fragment, with each parameter shown raw and decoded. Runs entirely in your browser.
Base64
Encoding & CryptoConvert 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
Encoding & CryptoTurn < > & 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
Encoding & CryptoSplit a JWT into header, payload and signature, and read iat, nbf and exp as dates. The signature is not verified — decoding only, all in your browser.
Unicode Escape
Encoding & CryptoConvert non-ASCII text and emoji into \uXXXX or \xXX escapes and back, with emoji written as proper surrogate pairs. Runs entirely in your browser.
Hash
Encoding & CryptoCompute MD5, SHA-1, SHA-256 or SHA-512 digests of any text, hashed as UTF-8 bytes so they match openssl and sha256sum exactly. Runs in your browser.