Tool
URL Encoder / Decoder
Percent-encode or decode URL text, for whole URLs or single components.
Try it
This tool runs entirely in your browser. Nothing you type or paste is sent anywhere.
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.
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
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.