Percent-encode or decode URLs and query strings instantly. Switch between full URL mode (encodeURI) and component mode (encodeURIComponent) for query params.
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.
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.