URL Encoder / Decoder
URLs only allow a limited set of characters. Encoding turns spaces, question marks, and non-ASCII text into percent-escapes so they can sit in a query string. Decoding reverses that so you can read a logged URL. Encode data you are putting into a URL. Do not encode a URL that is already encoded or you will double-escape it.
How to use the URL Encoder / Decoder
- Paste the text or the URL. For a query value, paste only the value. For a full URL you are trying to read, paste the whole string and decode.
- Encode or decode. Encoding uses percent-encoding. Decoding turns %20 back into a space and %3F back into a question mark.
- Watch for double encoding. If you see %2520, the value was encoded twice. Decode once and check again.
When it helps
- Query parameters. A search string with spaces or & must be encoded before you append it to ?q=.
- Reading access logs. Decode a request path so the ticket shows the path a person actually requested.
Common questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves URL structure characters such as : / ? & in place. encodeURIComponent escapes those too, which is what you want for a single parameter value. Match the function to the piece you are encoding.
Why did decoding throw an error?
A stray % that is not followed by two hex digits is invalid. The string was truncated or was not actually encoded.
Does this make a URL private?
No. Encoding is not encryption. The decoded value is trivial to recover.
Is the URL uploaded?
No. Encoding and decoding run locally.
Read the guide: URL Encoder & Decoder Online: Encode Special Characters for URLs