🔗

URL Encoder / Decoder

Percent-encode or decode URLs and query strings instantly. Switch between full URL mode (encodeURI) and component mode (encodeURIComponent) for query params.

Mode
Quick Examples — click to load
Query with spaces
https://example.com/search?q=hello world&lang=en
Query string params
name=John O'Brien&city=New York
Path with spaces
https://example.com/path with spaces/file (1).pdf
Email & message
email=user@example.com&message=Hello! How are you?
Advertisement
About this URL encoder & decoder

This tool converts text and URLs to and from percent-encoding — the format the web uses to carry characters that would otherwise have special meaning or be unsafe in a URL. Each reserved or non-ASCII character becomes a % followed by its two-digit hexadecimal byte value, so a space turns into %20 and an ampersand turns into %26.

It mirrors the two JavaScript functions developers reach for most: encodeURIComponent (Component mode), which escapes nearly everything including / ? & # =, and encodeURI (Full URL mode), which preserves the structural characters that hold a URL together. People use it to:

Everything runs locally and in-browser using the native encoding functions — your input is never uploaded, stored, or sent to a server, so you can paste sensitive tokens and URLs safely.

How to use
  1. Pick a mode — Component (encodeURIComponent) for query values, Full URL (encodeURI) for whole URLs.
  2. Paste your URL or text into the Input box — it auto-encodes after a short pause.
  3. Click Decode instead to reverse percent-encoding back into readable text.
  4. Use the Swap button to move the output into the input for a round-trip check.
  5. Click Copy Output to grab the result, or Clear to start over.
FAQ

Percent-encoding is a way to represent characters in a URL that are reserved, unsafe, or non-ASCII. Each such character is replaced by a percent sign followed by the two-digit hexadecimal value of its byte — for example a space becomes %20 and an at-sign becomes %40. It lets any text travel safely inside a URL.

Unreserved characters — letters A-Z and a-z, digits 0-9, and the symbols - _ . ~ — are never encoded. Reserved characters such as : / ? # [ ] @ ! $ & ' ( ) * + , ; =, the space, and any non-ASCII character (like accented letters or emoji) should be encoded when they appear inside a value rather than as URL structure.

encodeURI is meant for a whole URL and deliberately leaves the structural characters : / ? # & = + untouched so the address still works. encodeURIComponent is meant for a single piece of data and escapes those characters too. Use Component mode for query parameter values and Full URL mode for an entire address.

%20 is the percent-encoded form of a space character. The percent sign signals a hex escape and 20 is the hexadecimal ASCII code for a space. Whenever a URL needs to carry a literal space, it is written as %20.

Both can represent a space, but in different contexts. In the path of a URL a space must be %20. In the query string of an application/x-www-form-urlencoded form submission, a space is traditionally encoded as a plus sign instead. This tool uses %20, which is always safe; decode a + manually if you know it came from form encoding.

Paste the encoded text into the input, choose the matching mode, and click Decode. The tool converts each % escape back to its original character. If the input contains a malformed sequence — such as a lone % not followed by two valid hex digits — decoding fails and an error is shown.

Encode each parameter name and value separately with Component mode, then join them with raw = and & characters. This keeps an & inside a value from being mistaken for a separator and prevents a value like q=a&b from breaking the rest of the query string.