URL Encode & Decode Online
Encode/Decode full URLs or components. Parse query strings to a table. All in your browser.
URL breakdown
Query parameters
| Key | Value (decoded) |
|---|
What is URL encoding?
URL encoding, or percent-encoding, replaces characters that are unsafe or reserved in a URL with %
followed by their byte value in hex. Non-ASCII characters are first converted to UTFโ8 bytes, then each byte is encoded.
| Character | Encoded | Why |
|---|---|---|
| space | %20 | Not allowed in URLs (+ in HTML form data) |
& | %26 | Separates query parameters |
= | %3D | Separates key and value |
? | %3F | Starts the query string |
# | %23 | Starts the fragment |
/ | %2F | Path separator |
รฉ | %C3%A9 | Non-ASCII (2 UTFโ8 bytes) |
๐ | %F0%9F%98%80 | Emoji (4 UTFโ8 bytes) |
Encode vs Encode Component
- Encode (
encodeURI) is for a whole URL. It keeps characters with structural meaning โ: / ? # & = + @ ; , $โ and escapes spaces and non-ASCII characters. - Encode Component (
encodeURIComponent) is for a single value such as a query parameter or path segment. It escapes everything exceptAโZ aโz 0โ9 - _ . ! ~ * ' ( ).
Rule of thumb: build URLs by encoding each parameter value with Encode Component. Encoding a full URL with it
would also escape :// and break the link.
How to use this URL tool
- Paste a URL or text and choose Encode, Decode, Encode Component or Decode Component.
- For full URLs, the tool shows a breakdown of protocol, host, port, path, hash and a table of query parameters.
- Copy the result with one click.
Frequently asked questions
When should I URL-encode?
Whenever you put user input or arbitrary text into a URL โ query values, path segments or redirect targets โ encode it with encodeURIComponent.
Should a space be %20 or +?
In URL paths a space must be %20. In application/x-www-form-urlencoded query strings (HTML forms), + is also accepted as a space. %20 is always safe.
What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves URL delimiters like / ? & = # intact and is meant for complete URLs. encodeURIComponent escapes them and is meant for individual values.
Why do I get "URI malformed" when decoding?
The input contains a % that is not followed by two hex digits, or an invalid UTF-8 byte sequence. Check for stray % characters.
What is URL-safe Base64?
A Base64 variant that uses - and _ instead of + and / and usually omits = padding, so it can be placed in URLs without percent-encoding.
Is parsing done locally?
Yes. All encoding, decoding and URL parsing happens in your browser.