How to use the URL encoder
- Choose Encode or Decode.
- When encoding, choose Component for a single piece of a URL, such as one query parameter value or one path segment. It escapes every character that has a special meaning in URLs, including
/ ? & = #. Choose Full URL when you already have a complete address and only want to fix spaces and non-ASCII characters; it keeps the characters that give a URL its structure. - When decoding, keep Treat + as a space on for values copied from HTML form submissions or query strings, where a space is often written as
+.
If the text contains a query string, the tool also lists each parameter with its decoded value, which is a quick way to read long tracking or redirect URLs.
Why URLs need encoding
A URL may only contain a limited set of ASCII characters. Everything else, and every reserved character used as data rather than structure, has to be written as % followed by two hexadecimal digits for each byte of its UTF-8 representation. This is called percent-encoding.
For example, a search for café & bar must be sent as q=caf%C3%A9%20%26%20bar:
- the space becomes
%20 éis two bytes in UTF-8, so it becomes%C3%A9&becomes%26, so the server does not read it as the start of a new parameter
Component vs. full URL encoding
Encoding a whole URL as a component breaks it:
https://example.com/a b → https%3A%2F%2Fexample.com%2Fa%20b
Encoding a single value as a full URL leaves dangerous characters unescaped:
value "rock&roll" → rock&roll (the & starts a new parameter)
The rule of thumb: build the URL from its parts, and encode each value with Component before you join them.
Common mistakes
- Double encoding. Encoding text that is already encoded turns
%20into%2520. If you see%25in a URL, something was encoded twice. - Plus signs. In query strings sent by HTML forms,
+means a space. In paths, it means a literal plus sign. To send a literal+in a query value, encode it as%2B. - Malformed sequences. A lone
%or a cut-off multibyte sequence such as%E2%82cannot be decoded. The tool reports this instead of guessing.
Frequently asked questions
Which JavaScript functions does this match?
Component matches encodeURIComponent() and Full URL matches encodeURI(). Decoding uses decodeURIComponent(), which can read both.
Is this the same as HTML encoding?
No. URL encoding uses % sequences for URLs. HTML encoding uses entities like & for HTML documents. Use the HTML Encode / Decode tool for that.
Does the tool send my URLs anywhere?
No. All encoding and decoding happens in your browser.