UtiliTools

URL Encoder and Decoder

Encode and decode URLs and query string parameters. Turn spaces, accented letters and symbols into percent-encoding (%20, %C3%A9) and back to plain text in one click.

Result

q%3Dcaf%C3%A9%20%26%20cr%C3%A8me%20%26%20price%3D%2410

What is URL encoding?

URLs only accept a limited set of characters. Spaces, accented letters and symbols such as &, ? and # must be converted to percent-encoding: the character is turned into its UTF-8 bytes, each written as % followed by two hexadecimal digits. A space becomes %20 and é becomes %C3%A9.

Parameter or full URL?

  • Parameter (encodeURIComponent): encodes everything, including /, ?, & and =. Use it for a single query string value.
  • Full URL (encodeURI): keeps the URL structure and only encodes what is invalid, such as spaces and accents. Use it when you have the whole address.

URL encoding examples

  • New York → New%20York
  • a&b=c → a%26b%3Dc
  • 100% → 100%25

What about the plus sign (+)?

HTML forms (application/x-www-form-urlencoded) often send spaces as +. That is why the decoder turns + into a space. When encoding, a space always becomes %20, which works anywhere in a URL.

Frequently asked questions

What does %20 mean in a URL?

It is an encoded space. Spaces are not allowed in URLs, so they become %20, the hexadecimal code of the character.

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes everything, including / ? & and =, and is meant for parameter values. encodeURI keeps the URL structure and is meant for a full address.

Why did + turn into a space when decoding?

HTML forms send spaces as +, so the decoder treats + as a space. For a literal plus sign, use %2B.

How are accented characters encoded in a URL?

Each accented letter becomes its UTF-8 bytes in percent-encoding, so é becomes %C3%A9 and ñ becomes %C3%B1.

See also:

UtiliTools · by Viniciusadm · 2023 - 2026