URLs may only contain a limited set of characters. Spaces, accented letters, emoji and symbols like & or # must be percent-encoded or they’ll break the link or change its meaning. This tool encodes and decodes correctly for each part of a URL.
Typical uses
- Building links: encode search terms or redirect URLs before adding them to a query string.
- Debugging: read encoded parameters from logs, analytics or redirects.
- APIs: prepare values for GET requests and OAuth parameters.
- Marketing links: check what a long tracking URL really contains.
To split a URL into its parts, use the URL Parser.
How to use the URL Encode & Decode
- Paste text or a URL into the left box.
- Choose Encode or Decode.
- For encoding, pick Query value / path part for a single value, or Whole URL to keep characters like : / ? & intact.
- When decoding form data, keep treat + as a space ticked.
Features
- Two encoding modes matching JavaScript’s encodeURIComponent and encodeURI.
- UTF-8 percent-encoding for any language and emoji (é → %C3%A9).
- Decodes + as space for application/x-www-form-urlencoded data.
- Clear error for broken sequences, such as a % not followed by two hex digits.
Frequently asked questions
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ), so it’s right for one query value or path segment. encodeURI leaves URL structure characters like : / ? # & = alone, so it’s for a full URL that just needs spaces and non-ASCII characters fixed.
Should spaces be %20 or +?
In paths and most of a URL, use %20. The + for space comes from HTML form encoding and is only understood in query strings. When in doubt, %20 works everywhere.
Why do I see %25 in my URL?
%25 is an encoded percent sign. It usually means text was encoded twice. Decode it twice to get back to the original.
Written by Dewan Razib