URL Encode and Decode: Percent-Encoding and Query String Parser
Encode or decode text for use in URLs, choosing encodeURIComponent or encodeURI. Query strings are parsed into a table automatically.
Loading tool…
How to use the URL Encode & Decode
- Choose Encode or Decode.
- Pick encodeURIComponent for a single value or encodeURI for a full URL, and turn on form style if you need + for spaces.
- Paste your text or URL (use Each line separately for a list).
- Copy the result, inspect URL parts, or edit the query parameters and copy the rebuilt URL.
About this tool
URLs can only contain a limited set of characters. Percent-encoding replaces others, such as spaces, ampersands and non-English letters, with a % and two hex digits, so a space becomes %20.
encodeURIComponent escapes nearly everything and is the right choice for a single query value. encodeURI leaves characters that structure a URL, such as : / ? # & and =, so use it only on a complete URL. Plain decoding never turns + into a space, because in a path or normal URL + is a literal plus. Form style (application/x-www-form-urlencoded) writes a space as + and reads + as a space; the query parameter table always reads + as a space, as browsers do for form data.
If your text is already encoded (it contains sequences like %20), the tool warns about double encoding. For full URLs it shows scheme, host, port, path, query and fragment, and the query table lets you edit keys and values and copy a correctly encoded rebuilt URL. A broken percent sequence gives a clear error, naming the line in line-by-line mode.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps URL structure characters such as / ? & =. encodeURIComponent encodes them too, so use it for individual values.
Why does a space become %20, and when is it +?
Spaces are written as %20 in URLs. HTML forms use + instead; turn on Form style for that.
Does decoding turn + into a space?
Only in Form style and in the query parameter table. Normal decoding keeps + as +.
What is double encoding?
Encoding text that is already encoded, so %20 becomes %2520. The tool warns you when it sees percent sequences in text you are about to encode.
Is my URL sent anywhere?
No. Everything runs in your browser.
Need a custom tool or website?
IDM Valley builds web apps, calculators, AI chatbots and automation for businesses. Fixed prices, code in your name.









