Format Code Now
/
Encode & decodeURL Encode and Decode Next: JWT Decoder ›

URL Decode and Encode

ED-02

Paste percent-encoded text and press Decode to turn %20, %26 and %C3%A3 back into readable characters, or press Encode to escape text for a URL. It runs in your browser and nothing you paste is uploaded.

Runs in your browser. Nothing is uploaded.

Text or URL

Result

How to use it

  1. Paste the text or URL into the input box.
  2. Under Encode, choose A value for one query parameter or A whole URL to keep the / ? & = characters.
  3. Press Encode to escape the text, or Decode to turn percent codes back into characters.
  4. Tick Decode + as space if the text came from an HTML form or a query string that uses plus signs.
  5. Copy the result.

Encode a value or a whole URL

Encoding one value, such as a search term or a redirect address inside a query string, needs every reserved character escaped, including / ? & = and #. That is the A value setting. Encoding a full address needs the structure left alone so it still reads as a URL. That is the A whole URL setting, which keeps characters like / ? & = and : and escapes spaces and non-ASCII letters. For example, São Paulo becomes S%C3%A3o%20Paulo in both modes.

Plus signs and spaces

Percent decoding only reverses %XX codes, so a + stays a + by default. A plus means a space only in form-style query strings, such as q=hello+world. If your text came from one, tick Decode + as space. Encoding always writes a space as %20, and it writes a literal plus as %2B in the A value setting.

Decoding twice and decode errors

If decoded text still contains %20 or %25, it was encoded twice. A sequence like %2520 decodes to %20, so press Decode a second time to get the original. If Decode reports that the text is not valid percent-encoding, a % in your text is not followed by two hex digits, or the decoded bytes are not valid UTF-8. Encode a stray % as %25 and check for a copy that cut a code in half.

Questions people ask

How do I URL decode a string?

Paste the string into the box and press Decode. Each %XX code is turned back into its character, so %20 becomes a space and %C3%A3 becomes ã. The decoding happens in your browser and nothing you paste is uploaded.

What is the difference between encoding a value and a whole URL?

A value is escaped completely, including / ? & = and #, so it is safe inside a query parameter. A whole URL keeps those structure characters so the address still works, and only escapes spaces, non-ASCII letters and other unsafe characters.

Does URL decode turn + into a space?

Not by default. Percent decoding leaves a plus sign as a plus. Tick Decode + as space when the text comes from an HTML form or a query string that uses plus signs for spaces, such as q=hello+world.

Why does my decoded text still contain %20 or %25?

The text was encoded more than once. A code like %2520 is an encoded percent sign followed by 20, so one Decode gives %20. Press Decode again to get the original text.

What does Not valid percent-encoding mean?

A % in your text is not followed by two hex digits, or the decoded bytes are not valid UTF-8 text. Fix or remove the stray %, write a literal percent sign as %25, and make sure a code was not cut off when you copied it.

Is it safe to paste a URL with tokens in it?

The conversion runs in your browser and nothing is uploaded. If you use a share link, the input is kept in the part of the URL after the # sign, which browsers never send to a server. Still avoid sharing live secrets.

About this tool

Choose "a value" to encode a single query parameter, or "a whole URL" to keep the structure characters intact.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.