URL encoder and decoder
Percent-encode UTF-8 text for use as URL component data or decode percent escapes.
How it works
Standard mode preserves ASCII letters, digits, hyphen, period, underscore and tilde. Optional form-style mode uses plus for spaces and encodes literal plus signs. Both modes reject malformed escapes and invalid UTF-8. No normalization or whole-URL parsing is performed.
Copy conversion summary
Use Copy URL component conversion summary to copy the displayed output code-point count as tab-separated Metric and Value columns, without copying the input or converted text. For example, Aé😀 + becomes A%C3%A9%F0%9F%98%80%20%2B (25 output code points) in standard percent mode, or A%C3%A9%F0%9F%98%80+%2B (23 output code points) in form-style mode. Both decode to 5 code points in their respective formats. Empty input has a count of zero. Copy result remains separate.
URL component examples
- Café
Caf%C3%A9- a + b
a%20%2B%20b- 100%
100%25- 😀
%F0%9F%98%80
Form-style component encoding
Choose Form-style to encode a single UTF-8 value using the WHATWG form percent-encode set. ASCII space becomes +, literal plus becomes %2B, asterisk stays *, and tilde becomes %7E. For example, Coffee + Tea becomes Coffee+%2B+Tea, and ~* 100% becomes %7E*+100%25. Caf%C3%A9 is valid in either format. The decoder applies one pass only and rejects malformed escapes, raw non-URI characters and invalid UTF-8 instead of using forgiving browser form parsing. It does not split on ampersands or equals signs. See WHATWG URL Standard, form encoding.
Accepted input and limits
Encode one component value, not an entire URL. In standard mode, the unreserved characters A–Z, a–z, 0–9, hyphen, period, underscore and tilde are left unchanged. All other UTF-8 bytes become uppercase percent escapes. Decode accepts ASCII unreserved or reserved URI characters, and percent escapes with exactly two hexadecimal digits. Lowercase hex is accepted. Raw spaces, non-ASCII letters and other raw characters outside the URI alphabet must be percent-encoded first. In standard mode, literal plus is preserved, so a+b decodes to a+b. In form-style mode, raw plus decodes to a space; %2B still decodes to a literal plus. Decoding runs once: %2520 becomes %20. Malformed escapes and invalid UTF-8 are rejected. Encode up to 4,000 UTF-16 units and 4,000 UTF-8 bytes; decode up to 12,000 characters representing at most 4,000 bytes. Empty input gives empty output.
Do not apply this tool to an entire URL: encoding its separators changes their meaning. The result is not a URL sanitizer, an encryption method or an HTML escape. The optional form-style format handles a single component, not a complete form or query string. Decoded markup is displayed as plain text. Text fields may normalize carriage returns; copying CR or NUL requires compatible secure clipboard support. Keep the original encoded value for lossless interchange. A leading BOM is preserved and no Unicode normalization is applied.
Related: URL slug generator · Unicode inspector · UTF-8 byte converter · Base64 encoder and decoder · HTML reference converter. Slugs may discard characters; percent encoding preserves scalar sequences. See RFC 3986, sections 2.1–2.4 and RFC 3629 (UTF-8).