iPGaze

URL Encode / Decode

Percent-encode or decode text for use in URLs.

Results appear as you type

Everything runs locally in your browser β€” your input never leaves this page.

About the URL Encode / Decode

URL Encode / Decode percent-encodes text so it can be safely placed in a URL, or decodes percent-encoded strings back into readable characters. It correctly handles reserved characters such as spaces, ampersands and question marks that would otherwise break a query string. The tool works fully client-side, so your input stays private in your browser.

How to use

  1. Paste the text or URL component you want to convert.
  2. Select encode to percent-encode it, or decode to reverse it.
  3. View the converted string immediately.
  4. Copy the result into your link, API request or query parameter.

Percent-encoding differs by position in the URL

There is no single correct percent-encoding of a string, because what counts as a reserved character depends on where in the URL it sits. A `/` is structural in a path and must be encoded if it is part of a segment's value, but it is perfectly legal unescaped inside a query string. A `?` starts the query, so it must be encoded anywhere before that point. This is why JavaScript ships two functions: `encodeURI` preserves the characters that build a URL's structure, while `encodeURIComponent` escapes them because it assumes you are encoding one value to drop into that structure.

The space character is the classic ambiguity. In a path it becomes `%20`. In an `application/x-www-form-urlencoded` query string β€” the format HTML forms submit β€” it becomes `+`, and a literal plus must then be written `%2B`. Decoding a query string with a path decoder turns every `+` into a space, which quietly corrupts base64 values passed as parameters.

Encoding twice is the failure you will actually hit in production. `%` is itself a character that needs encoding, so a string run through an encoder twice turns `%20` into `%2520`. It usually surfaces as a redirect chain where each hop adds a layer, and the symptom is a literal `%2520` visible in the address bar.

Frequently asked questions

What is the difference between encoding a full URL and a component?
Encoding a whole URL preserves structural characters like slashes and colons, while encoding a single component (such as a query value) escapes them too. Use component encoding for individual parameter values.
Why do spaces sometimes become %20 and other times a plus sign?
In the path and standard percent-encoding a space is %20, while in the query string of HTML form submissions a space is often encoded as +. Both decode back to a space.
Does this tool send my data anywhere?
No. Encoding and decoding run entirely in your browser, so your text is never transmitted to a server.

Related Developer tools