ToolGlint

URL Encode and Decode

Percent-encode text for use in a URL or decode an encoded URL back to readable text. Free and runs in your browser.

Paste or type, or drop a file on the box.

Runs in your browser. Nothing you enter is uploaded or stored.

How to use the URL Encode and Decode

  1. Choose Encode to make text safe for a URL, or Decode to turn an encoded URL back into readable text.
  2. Type or paste into the left box. The result appears on the right as you type.
  3. When encoding, pick Parameter value for a single value such as a search term, or Whole URL to keep the slashes, question mark and other structure of a complete address.
  4. Tick the + option if the text is form data, where a space is written as + instead of %20.
  5. Copy the result, or press Swap to send it back the other way.

Questions and answers

Is my text sent to a server?
No. Encoding and decoding run entirely in your browser. Nothing you type or paste is uploaded, stored or logged, which matters because URLs often carry tokens and personal details.
What is URL encoding?
A URL may only contain a limited set of characters. URL encoding, also called percent-encoding, replaces every other character with a % followed by two hexadecimal digits for each of its UTF-8 bytes. A space becomes %20 and é becomes %C3%A9.
What is the difference between Parameter value and Whole URL?
Parameter value encodes everything except letters, digits and - _ . ~, including / ? & = and #. Use it for one piece of a URL, so those characters cannot be mistaken for URL structure. Whole URL leaves the structural characters alone and only encodes what is never allowed, such as spaces and non-English letters. Use it when you have a complete address that just needs cleaning up.
Should a space be %20 or +?
%20 works everywhere in a URL. The + form is only valid in a query string and in form submissions (application/x-www-form-urlencoded). If you are not sure, use %20. When decoding a query string copied from a form, tick the + option so each + is read as a space.
Why does decoding fail?
Either a % sign is not followed by two hexadecimal digits, which usually means the text has a plain % that was never encoded as %25, or the encoded bytes do not form valid UTF-8, which happens when the text was encoded with an older character set such as Latin-1.
Why is my text still encoded after decoding?
It was encoded twice. A value such as %2520 decodes to %20 the first time and to a space the second time. Press Swap and decode again until it reads normally.

Related tools