Skip to content

URL Encode and Decode

Percent-encode text so it is safe inside a web address, or decode %20-style text back to normal.

URL encoder
Choose encode or decode and what you are working on.

Result
Result
hello%20world%20%26%20more%3D%C3%A9
21
UTF-8 bytes

Private: Everything runs in this page. Nothing you type is sent anywhere or saved.

On this page
  1. URL encoding examples
  2. Formula
  3. How the url encoder works
  4. What this tool does not do
  5. Frequently asked questions
  6. References
  7. Related tools

URL encoding examples

TextEncoded as a valueEncoded as a whole URL
hello world & morehello%20world%20%26%20morehello%20world%20&%20more
a/b?c=da%2Fb%3Fc%3Dda/b?c=d
cafécaf%C3%A9caf%C3%A9
100% sure100%25%20sure100%25%20sure

Formula

unsafe characters become % followed by two hex digits of their UTF-8 bytes

How the url encoder works

  1. Step oneChoose Encode or Decode.
  2. Step twoPick A value for a single parameter or path part, or A whole URL to keep characters such as / ? and & as they are.
  3. Step threeCopy the result from the box.

What this tool does not do

  • It does not check that a web address works or that the page exists.
  • Encoding a whole URL keeps its structure characters, so it cannot fix an address that is already wrong.
  • It uses UTF-8 percent-encoding only.

Frequently asked questions

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

A value is encoded fully, including / ? & and = so it cannot break the address. A whole URL keeps those characters, because they give the address its structure.

Why would I want + for spaces?

HTML forms send spaces as plus signs. Most other places use %20, which is the default here.

Why does decoding say my text is not valid?

A percent sign must be followed by two hex digits, and the bytes must form valid UTF-8 text.

References