Skip to content

URL Encode / Decode

A space becomes %20 and & becomes %26. Paste text to percent-encode it for a URL (RFC 3986), or paste an encoded string to decode it. Output updates as you type.

Encoding mode

Percent-encode text for safe use in a URL, or decode an encoded string back to readable form. Follows RFC 3986 and converts live as you type — entirely in your browser.

What gets encoded

Strict mode follows RFC 3986: letters, digits and - _ . ~ stay as they are, and every other byte becomes % plus two hex digits. encodeURIComponent leaves ! ' ( ) * as they are. Full URL mode keeps the characters that give a URL its structure, so a b&c/d?e=f becomes a%20b&c/d?e=f.

CharacterStrict RFC 3986encodeURIComponentFull URL
space%20%20%20
!%21!!
"%22%22%22
#%23%23#
$%24%24$
%%25%25%25
&%26%26&
'%27''
(%28((
)%29))
*%2A**
+%2B%2B+
,%2C%2C,
/%2F%2F/
:%3A%3A:
;%3B%3B;
=%3D%3D=
?%3F%3F?
@%40%40@
[%5B%5B%5B
]%5D%5D%5D
----
____
....
~~~~

Text outside ASCII is encoded as UTF-8 bytes in every mode: é becomes %C3%A9.

%20 or + for a space?

Use %20. Every mode of this tool encodes a space as %20, which is correct in any part of a URL. A + means a space only in form data and query strings sent as application/x-www-form-urlencoded, the format HTML forms use; to decode that format, tick “Treat + as a space”.

Does a dash need encoding?

No. The hyphen - is an unreserved character in RFC 3986, like _, . and ~, so no mode of this tool encodes it.

Frequently asked questions

What is URL encoding?

It replaces characters that are unsafe or reserved in URLs — spaces, &, ?, and non-ASCII text — with a % and their byte values, like %20 for a space.

When do I need it?

Whenever you put arbitrary text into a query string or path, such as search terms or email addresses.

Does it handle Unicode?

Yes — text is treated as UTF-8, so accents, emoji, and non-Latin scripts encode and decode correctly.

What is the difference between encodeURI and encodeURIComponent?

encodeURI is for a whole URL: it keeps ; , / ? : @ & = + $ # so the address still works. encodeURIComponent is for one part, such as a query value, and encodes those characters too. Both leave letters, digits and - _ . ! ~ * ' ( ) as they are. Here, Full URL mode uses encodeURI, and Strict mode also encodes ! ' ( ) *.