URL Encoder / Decoder
Paste text and get its percent-encoded form (hello world → hello%20world), or paste an encoded string back and recover the original. The conversion is UTF-8 aware, so Chinese, accents and emoji survive the round trip intact.
What percent-encoding is actually for
URLs are allowed to contain only a small set of characters. Everything else — spaces, &, ?, non-ASCII letters — must be rewritten as % plus the byte's hex code, hence the name. Getting this wrong is the quiet cause of endless bugs: a query string containing a raw & splits into two parameters, and a raw space is illegal in every browser.
Older systems encoded byte-by-byte in legacy code pages; the modern standard is UTF-8 bytes, which is what this tool uses and what every current web API expects. That's why 中文 becomes %E4%B8%AD%E6%96%87 — three UTF-8 bytes each.
FAQ
- Encode in the path or the query?
- Both need it, but a path may keep
/while a query value may not. This tool encodes component-style (viaencodeURIComponent), the safest default for parameter values. - What about + vs %20 for spaces?
- Query strings written by old HTML forms use
+for spaces;%20is the universal form. Decoding here accepts both. - Can decode fail?
- Only if the input has broken escapes like
%ZZ; the page then tells you instead of silently mangling text.