Encoding
URL Encode/Decode
Encode and decode URLs — characters that need escaping in links and query parameters.
URL encoding (percent-encoding) replaces characters that aren't allowed in a URL — spaces, non-Latin letters, special characters — with %XX sequences, where XX is the hex code of the byte. This keeps links and query parameters from getting mangled in transit.
How to use it
- Encode: paste text or a URL and any character outside the safe ASCII set is replaced with a %XX sequence.
- Decode: paste an encoded string to see the original text.
- Encoding a full URL and encoding a single query parameter use slightly different safe-character sets — pick the mode that matches what you're encoding.
Common uses
- Building query parameters from text containing spaces, ampersands, or non-Latin characters.
- Debugging why a link with a parameter breaks — often the cause is an unencoded special character.
- Decoding URLs from third-party systems to read them in their original form.
Things to keep in mind
Encode parameter values, not the whole URL at once — otherwise you'll also encode the separators you need (:, /, ?, &).
JavaScript's encodeURIComponent and encodeURI encode different character sets — the former is meant specifically for parameter values.
Article about this tool: URL Encode/Decode: percent-encoding in links
Frequently asked questions
What is the difference between Component and URI encoding?
Component encoding (encodeURIComponent) escapes nearly all reserved characters, so it's right for a single query parameter or path segment. URI encoding (encodeURI) leaves characters like / : ? & = untouched, since it's meant for encoding a whole URL that already has structure.
Is URL encoding the same as Base64?
No, they're often confused but are different techniques. URL encoding (percent-encoding) replaces unsafe characters with %XX sequences and keeps most ASCII text readable, while Base64 re-encodes the entire input into a compact alphabet — you'd use URL-safe Base64 for a different purpose, like embedding binary data in a URL.
Does this tool send my URLs to a server?
No. Encoding and decoding happen entirely in your browser, so nothing you paste here is transmitted anywhere.
What is double encoding and how do I spot it?
It's a mistake where an already-encoded string gets encoded again — the % character itself turns into %25, so %20 becomes %2520. The telltale sign is sequences like %25XX in the decoded result.
Why is a space sometimes encoded as + and sometimes as %20?
+ for a space is the application/x-www-form-urlencoded format used by forms and query strings. %20 is standard percent-encoding from RFC 3986, valid anywhere in a URL.