What Does the URL Encoder / Decoder Do?
This tool percent-encodes text for safe use in URLs and decodes percent-encoded strings back to readable text. It offers the two standard modes developers actually need: encodeURIComponent, which encodes every reserved character and is right for query-string values, and encodeURI, which preserves URL structure characters (:/?&=#) and is right for encoding a complete URL.
Spaces become %20, an ampersand becomes %26, and non-ASCII characters are encoded as their UTF-8 byte sequences โ รฉ becomes %C3%A9. When decoding, + signs are also converted back to spaces to handle the common form-encoding variant.
How to Use the Tool
- Choose Encode or Decode.
- Pick the mode: encodeURIComponent for values, encodeURI for whole URLs.
- Type or paste your text โ conversion happens live.
- Copy the result. Malformed percent-sequences produce a clear error when decoding.
When Do You Need URL Encoding?
- Query parameters โ a search for "coffee & cream" must be sent as
q=coffee%20%26%20cream, or the ampersand splits the query. - Redirect and callback URLs โ a URL passed inside another URL must be fully component-encoded or its own parameters leak into the outer URL.
- Debugging โ decode a long tracking link or OAuth redirect to see what is actually inside it.
- International text โ filenames and paths containing accents or non-Latin scripts need percent-encoding to travel reliably.