URL Encoder/Decoder

Last updated: October 16, 2026  •  Published by: NOFYI Editorial Team  •  Category: Developer Tools

Workspace

What Is the URL Encoder/Decoder?

The URL Encoder/Decoder converts text to and from percent-encoded form, the format URLs use for characters that are not allowed literally in a web address. Encoding replaces a reserved or non-ASCII character with a percent sign followed by its two-digit hexadecimal byte value. For example, a space becomes %20 and an ampersand becomes %26. Decoding reverses the process, turning percent sequences back into the original characters.

This matters because URLs may only safely contain a limited set of characters. Spaces, quotes, angle brackets, non-Latin letters, and characters with special meaning in a URL, such as ?, &, =, and #, must be encoded when they appear inside a value such as a query parameter. If they are left unencoded, a browser or server may split the URL at the wrong place or reject the request.

How to Use the URL Encoder/Decoder

  1. Paste or type the text you want to convert into the input box.
  2. Choose Encode to convert the text into percent-encoded form, or Decode to convert percent-encoded text back to readable text.
  3. Copy the result and paste it into your URL, link, form value, or code.
  4. If you are encoding a single query-parameter value, encode only that value, not the whole URL, so characters such as ? and & that structure the URL stay intact.
  5. If decoding produces unexpected characters, check that the input was encoded as UTF-8, which is the standard encoding for modern URLs.

Worked Example

Suppose you want to link to a search for the phrase coffee & tea on a site whose search URL is https://example.com/search?q=. Pasting the phrase directly after q= would break the URL, because the & would be read as the start of a new parameter.

Encoding just the value coffee & tea gives coffee%20%26%20tea. The full link becomes https://example.com/search?q=coffee%20%26%20tea. Decoding coffee%20%26%20tea returns coffee & tea.

Another example: the word café encodes to caf%C3%A9, because the character é is two bytes in UTF-8, C3 and A9. Decoding caf%C3%A9 returns café.

Limitations

  • Encoding does not make a broken or mistyped URL valid; it only escapes characters. A wrong domain or path will still fail.
  • Encoding a complete URL, rather than just one value, will also encode the structural characters ?, &, =, and #, which usually breaks the link.
  • Decoding text that contains a literal percent sign followed by two characters that are not valid hexadecimal, such as 100% sure, can produce an error or leave the sequence unchanged.
  • The tool assumes UTF-8 encoding. Text encoded with an older character set may decode to the wrong characters.
  • Percent-encoding is not encryption. Anyone can decode an encoded URL, so do not use it to hide passwords, tokens, or other secrets.

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

Both produce percent-encoded output, but encodeURIComponent encodes more characters, including &, =, +, and #, so it is the right choice for a single query-parameter value. encodeURI leaves URL structure characters untouched and is meant for a whole URL.

Why does a space sometimes become %20 and sometimes +?

In a URL path or in a value encoded with encodeURIComponent, a space becomes %20. In HTML form submissions using the application/x-www-form-urlencoded format, a space is often written as +. Both forms are common, but %20 is the safer choice inside a link you build by hand.

Can I encode an entire URL?

You can, but you usually should not. Encoding a whole URL escapes its ?, &, and = characters, so the result is a single opaque string rather than a working link. Encode only the individual values that need it.

Is URL encoding the same as encryption?

No. Percent-encoding is a reversible text format, not encryption. It protects the structure of a URL, not the secrecy of its contents. Anyone who sees an encoded URL can decode it in seconds.