URL Encoder / Decoder
Percent-encode or decode URL text, for whole URLs or single components.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Percent-encoded the input using component rules.
How it works
- Replaced characters that are unsafe in a URI with %XX or %UTF-8 sequences.
- Produced the encoded value.
- Component mode encodes reserved characters such as '&' and '='; whole-URL mode preserves the URL structure.
Methodology
- Percent-encode by replacing each byte that is not in the allowed set with %HH using uppercase hexadecimal digits.
- Reserve the RFC 3986 gen-delims and sub-delims in whole-URL mode, and encode them in component mode.
- Decode by validating every %HH escape before replacing it, so malformed input is rejected rather than partially decoded.
Usage
- Choose encode or decode.
- Choose component mode for query values, or whole-URL mode for a complete URL.
- Paste the value and read the result.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Encode a query value
{
"mode": "encode",
"value": "a=1&b=2",
"component": true
}Decode an escaped value
{
"mode": "decode",
"value": "caf%C3%A9",
"component": true
}Limitations
Why two modes exist
encodeURI and encodeURIComponent differ in which reserved characters they escape. Picking the wrong one either breaks a URL's structure or leaves a value ambiguous. Component mode is the safe default for values, which is why it is preselected.
Frequently asked questions
- When should I use component mode?
- Use it for any single query-string value or path segment. Use whole-URL mode only when you are encoding a complete, already-structured URL.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.