encodeURIComponent and encodeURI modes, honest errors on broken % sequences, line-by-line batches.
CONDUITRFC 3986 · UTF-8 · line-by-line
Full encoding: & = ? # / also become %XX - use this for parameter values.
Plain text / to encode
Encoded / %XX sequence
Your text is converted inside this device's browser only - nothing is uploaded, nothing is collected, and it works offline. The mode preference lives in this browser's localStorage; switching devices or clearing site data loses it. "Clear my data" in the footer removes it.
Three steps
Pastethe URL or parameter value into the left pane (multi-line input is processed line by line, handy for batches).
Pick a modefull encoding for parameter values, structure-preserving for whole URLs; the right pane refreshes as you type.
Take it awayhit "Copy", or press the round middle button to push the result back and run the reverse direction.
Facts and limits
Input
Any UTF-8 text; multi-line input is processed line by line (one output line per input line); up to 1MB per run
Output
Percent-encoded string (%XX sequences, UTF-8 bytes); decoding restores the original text
Key parameters
Mode defaults to encodeURIComponent (full); switch to encodeURI (keeps & = ? # / intact); ?mode=uri links straight to it; + is never treated as a space (RFC 3986)
Processing
Browser-local JavaScript, no upload, no account; the mode preference sits in localStorage (nothing written on first load)
Limits
1MB input per run (larger input is rejected with a message, never hangs the page); unlimited line count
Known edges
Does not decode + as space from application/x-www-form-urlencoded data (replace + with %20 first); no Base64URL handling - use the Base64 tool for that
FAQ
encodeURIComponent or encodeURI - which one do I need?
Rule of thumb: encode a parameter value with encodeURIComponent, encode a whole URL with encodeURI. encodeURIComponent also converts &, =, ? and # into %XX so special characters inside a value cannot break the URL structure; encodeURI leaves those intact and only converts characters that are outright illegal in a URL, like spaces and non-ASCII text. When in doubt, try both - paste each result into a browser address bar and see which one survives.
Why does decoding fail with an illegal % sequence?
Your input contains something like %ZZ or %G1 - characters after the percent sign that are not valid hexadecimal - or a % with fewer than two characters following it. Plenty of online tools quietly skip or pass those through; this page raises an error and points at the first offending position instead, because a broken escape usually means the link you copied was truncated or mangled somewhere. Fix the % (escape it as %25) or remove the damaged fragment, then retry.
Why does one CJK character become nine characters like %E4%BD%A0?
URL encoding first splits the string into UTF-8 bytes. A CJK character is usually 3 bytes, and each byte becomes one %XX triplet - so 3 bytes times 3 characters each equals 9. Emoji run longer: most are 4 bytes, producing 12 characters. That is not a bug; it is exactly what RFC 3986 prescribes.
Why did my + signs turn into spaces after decoding elsewhere?
They did not change here. That behavior comes from the legacy application/x-www-form-urlencoded format, which encodes spaces as + and decodes + back to spaces. Pure URL percent-encoding (RFC 3986) writes spaces as %20 and treats + as a literal plus. This tool follows RFC 3986 and keeps + as-is; if your data came from an old form submission, replace + with %20 before decoding here.
Is my text uploaded anywhere?
No. Encoding and decoding happen entirely inside this device's browser - there is no upload endpoint and it works offline. Only your mode preference lives in this browser's localStorage; it does not follow you to another device, and "Clear my data" in the footer removes it.