Developer & Data100% Free for AllClient-Side PrivateAuto-saved (3 days)

URL Encoder / Decoder

Quickly percent-encode URL strings and decode encoded URLs. Supports full URL encode and encodeURIComponent modes.

Input Text / URL
Output

URLs may only contain a restricted set of ASCII characters, so anything else — spaces, ampersands, accented letters, emoji — must be percent-encoded to survive the trip. Get this wrong and a query parameter silently truncates at the first '&', or a redirect drops half its target. This tool encodes and decodes both full URLs and individual components, so you can pick the behaviour you actually need.

How to encode or decode a URL

  1. Choose Encode to make text safe for a URL, or Decode to turn percent-escapes back into readable characters.
  2. Decide whether you are handling a whole URL or a single parameter value — this matters, because a full URL must keep its ':', '/', and '?' intact while a parameter value must escape them.
  3. Paste your input and read the converted result.
  4. Check the output for '%25' sequences, which indicate the input was already encoded once.

The URL Encoder / Decoder runs entirely in your browser — nothing you enter is uploaded, stored, or logged.

When to use this tool

Building query strings safely

A search term containing '&' or '=' will break the parameter it sits in unless encoded. Encoding the value — not the whole URL — is the correct fix.

Passing a URL as a parameter

Redirect and callback parameters carry one URL inside another. The inner URL must be fully component-encoded, turning '://' into '%3A%2F%2F', or the outer URL's parser will misread it.

Reading encoded links from logs

Analytics and server logs store URLs encoded. Decoding makes it obvious what a user actually searched for or which campaign parameters were attached.

Things worth knowing

  • Spaces become '%20' in paths but may appear as '+' in query strings — both decode to a space, but only in the query component.
  • Encoding an already-encoded string double-encodes it: '%20' becomes '%2520'. If you see '%25' in output you did not expect, that is the symptom.
  • The characters - _ . ~ are unreserved and never need encoding.
  • Fragment identifiers after '#' are never sent to the server, so encoding problems there are purely client-side.

Frequently Asked Questions

Why encode URLs?

URLs can only contain certain ASCII characters. Special characters like spaces or symbols must be percent-encoded.

What is the difference between encodeURI and encodeURIComponent?

encodeURI is for a complete URL and deliberately leaves structural characters like ':', '/', '?', and '#' alone so the URL stays valid. encodeURIComponent is for a single piece — one parameter value or path segment — and escapes those characters too. Using the wrong one is the most common source of broken links: encode a full URL with encodeURI, encode a value going into a parameter with encodeURIComponent.

Why does my encoded URL have %2520 in it?

That is a double-encoded space. The text was encoded twice: ' ' became '%20', then the '%' in '%20' was itself encoded to '%25', producing '%2520'. Decode once and re-encode a single time to fix it.

Do I need to encode non-English characters?

Yes for transmission, though modern browsers hide this. Characters outside ASCII are converted to UTF-8 bytes and each byte is percent-encoded, so 'é' becomes '%C3%A9'. The address bar displays the readable form while sending the encoded one.

Should spaces be %20 or +?

'%20' is correct everywhere and always safe. '+' means a space only within the query string, under the older form-encoding rules. In a path segment, '+' is a literal plus sign — which is exactly why email addresses with '+' in them so often break.

Is there a maximum URL length?

The specification sets no limit, but implementations do. Roughly 2,000 characters is the practical safe ceiling across browsers, servers, and proxies. Since encoding expands the string, a URL that fits before encoding may not after.