URL Encoder/Decoder
Percent-encode and decode URLs and query strings.
What is the URL Encoder/Decoder?
URL encoding replaces characters that are unsafe or reserved in a URL with a percent sign and their hex byte value, so a space becomes %20 and an ampersand becomes %26. Without it, spaces break the URL and reserved characters get misread as delimiters between parameters.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI is for a whole URL and deliberately leaves :/?&= intact so the structure survives. encodeURIComponent is for a single value and escapes those characters too. Use the component version for query-string values, or an & inside a value will split the parameter.
Why do spaces sometimes become + instead of %20?
Because HTML form submissions use application/x-www-form-urlencoded, which encodes a space as +. Both appear in the wild, so a decoder has to know which convention produced the string to round-trip it correctly.
Related Encoders & Decoders
- Base64 Encode/DecodeConvert text and files to and from Base64.
- JWT DecoderInspect JWT headers, claims and expiry.
- HTML Encoder/DecoderEscape and unescape HTML entities.
URL Encoder/Decoder is one of 4 tools in Encoders & Decoders on Toolkit Hub, a free collection of browser-based utilities. It requires no account and no installation. Browse all tools.