SuperDevTools

Online URL encoding

Encode text for use in a URL

A URL only accepts a small set of characters. Spaces, accented letters and the signs that have a job in the address (&, =, ?, /, #) must be encoded whenever they are part of a value. This tool does that conversion, giving you text that is ready to drop into a query parameter, a share link or an API call. To put that link on a poster or a flyer, the QR code generator turns it into a code people can scan.

How to use it

  1. Type the value to encode in the text box.
  2. Click the encode button.
  3. The result appears in the green box.
  4. Click the copy button, then paste it into your URL after the parameter's = sign.

The rules applied

Unaccented letters, digits and the characters -, _ and . are left alone. A space becomes +. Everything else is replaced by % followed by two hexadecimal digits, one group per UTF-8 byte. The letter "é" takes two bytes, so it becomes %C3%A9.

InputOutput
C++ & C#C%2B%2B+%26+C%23
a+b=ca%2Bb%3Dc
100%100%25
https://example.com/?q=1https%3A%2F%2Fexample.com%2F%3Fq%3D1

Common mistakes

  • Encoding the whole address. As the last row shows, the tool encodes everything, including :// and ?. A full URL run through it is no longer clickable. Encode each value on its own, then assemble the address. There is one case where encoding everything is right: when a URL is itself the value of a parameter, such as a redirect target.
  • Encoding twice. The % sign is itself encoded as %25. Run caf%C3%A9 through the tool again and you get caf%25C3%25A9; the destination page will then show "caf%C3%A9" instead of "café". If in doubt, paste the result into the online URL decoding tool to see what the server will receive.
  • Using + in a path. The + only means a space in the query part, after the ?. In a path or a file name, replace it with %20. For a readable page address with no spaces or accents, the URL slug generator gives a cleaner result.

Frequently asked questions

What is the difference between + and %20?

Both stand for a space. The + comes from the web form format and is only understood in query parameters. %20 is valid anywhere in a URL. This tool always outputs +.

Why is the tilde encoded?

The tool turns ~ into %7E. Servers treat both spellings as the same character, so the link works either way.

Is my text stored?

It is sent to our server over HTTPS for the time of the calculation and is not saved.