How to use the url encoder / decoder
- Paste text or a URL. If it contains %XX sequences the tool switches to Decode, otherwise to Encode.
- Pick the style: Component for a single query value or path segment, Full URL to keep :/?&= intact, or Form for x-www-form-urlencoded bodies.
- Copy the result, download it, or press Swap to feed the output back in and convert the other way.
Features
- Three real-world encodings: encodeURIComponent, encodeURI and application/x-www-form-urlencoded
- Automatic encode/decode detection on paste
- Clear errors for malformed sequences such as a lone % or %G1, with the exact position
- Correct UTF-8 handling for non-Latin scripts and emoji
- Swap, copy and download buttons
Component, full URL or form?
encodeURIComponent escapes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for one value that goes inside a URL, such as a search term in ?q=... or a file name in a path. It turns & into %26, so the value can't be mistaken for a separator.
encodeURI leaves URL structure alone: : / ? # & = + @ survive. Use it when you have a complete URL that merely contains spaces or non-ASCII characters. It would not escape an & inside a search term, so never use it for individual values.
Form encoding is what browsers use when submitting an HTML form or when you build a body with URLSearchParams: spaces become + and ! ' ( ) ~ are escaped. Decoding a form string with plain decodeURIComponent leaves the + signs in place, which is a common bug; this tool converts them when Form is selected.
Common decoding errors
A % must always be followed by two hexadecimal digits. Text such as 100% off or a truncated %E2%82 fails to decode; the tool tells you where. If a value looks double-encoded (%2520 instead of %20), decode it twice using Swap.