URL Encoder and Decoder
Make a value safe to put in a query string, or turn a link full of %E2%9C%93-style sequences back into readable text. Everything is encoded and decoded as UTF-8.
The conversion runs in your browser and nothing you paste is sent anywhere.
Your files and text are processed only in this browser. Nothing is uploaded or stored on a server.
How to use
- Choose encode or decode.
- Pick component mode or full-URL mode.
- Paste your text; turn on per-line processing for a list of URLs.
- Copy the result.
Features and limits
- Component mode (encodeURIComponent) also encodes & = ? /, which is what you want for a single query parameter value.
- Full-URL mode (encodeURI) leaves URL structure such as :, /, ? and & intact and encodes spaces and non-ASCII characters.
- Per-line mode encodes or decodes each line independently.
- The "space as +" option follows HTML form encoding: spaces become + when encoding, and + becomes a space when decoding.
- If decoding fails, the line containing the malformed %-sequence is shown.
FAQ
What's the difference between encodeURI and encodeURIComponent?
encodeURI is for whole URLs and keeps characters like / ? & as they are. encodeURIComponent encodes those too, so a value containing & won't be mistaken for the start of another parameter.
Should spaces be %20 or +?
Use %20 in URL paths. The + form belongs to HTML form data (application/x-www-form-urlencoded), so pick it only when the receiver expects that format.
What does "URI malformed" mean?
A % sign isn't followed by two valid hex digits, or the bytes don't form valid UTF-8. The tool points to the line where that happens.
Why is my URL encoded twice (%2520)?
%25 is an encoded % sign, so the text was encoded when it already contained percent-escapes. Decode it once more to get back to the original.