URL Encode / Decode

Paste text or an encoded string and get the other form. Choose whether to encode a single value or a whole URL.

Embed this tool

Paste this into your page — the widget loads noindexed and links back here.

Reserved vs unreserved characters

The URL spec defines unreserved characters that never need encoding — A–Z a–z 0–9 - _ . ~ — and reserved characters that carry structural meaning:: / ? # [ ] @ ! $ & ' ( ) * + , ; =. Everything else (spaces, most punctuation, all non-ASCII) is encoded as one or more %HH byte values.

Component vs full URL

InputComponent modeFull-URL mode
a b&c=da%20b%26c%3Dda%20b&c=d
https://x.com/p qhttps%3A%2F%2Fx.com%2Fp%20qhttps://x.com/p%20q

Use component mode for a value you are dropping into a query string or a single path segment; use full-URL mode for an entire address that only needs its spaces and Unicode cleaned up.

Related

For encoding binary data as text rather than escaping URL characters, see Base64 encode / decode. For turning a title into a URL slug, the case converter's kebab-case output is a good start.

Related tools

Frequently asked questions

What is URL encoding?
Also called percent-encoding. Characters that have a special meaning in a URL (space, &, =, ?, #, /) or that are outside the safe set are replaced with a % followed by their byte value in hexadecimal. A space becomes %20, an ampersand becomes %26.
What is the difference between the two modes?
'Encode component' (encodeURIComponent) escapes everything that is not an unreserved character — use it for a single query-string value or path segment. 'Encode full URL' (encodeURI) leaves the URL structure characters :/?#[]@!$&'()*+,;= intact — use it when you have a complete URL that just contains spaces or Unicode.
Why does a space sometimes become + instead of %20?
In the query string of application/x-www-form-urlencoded form submissions, spaces are traditionally encoded as +. Elsewhere in a URL a space is %20. This tool encodes to %20 and, when decoding, also converts + back to a space so both conventions work.
Do I need to encode non-English characters?
Yes for maximum compatibility. 'café' becomes 'caf%C3%A9' because é is two UTF-8 bytes. Modern browsers display many Unicode characters in the address bar un-encoded, but the encoded form is what is actually sent and what you should put in code and links.
When should I encode?
Any time you build a URL from data you do not control: a search term, a filename, a redirect target, an email address in a mailto link. Not encoding is a common source of broken links and, in some contexts, injection bugs.
Should I double-encode?
Almost never. If a value is already encoded and you encode it again, %20 becomes %2520 and it will not decode correctly on the other end. Decode fully first if you are unsure of the current state.
Is this the same as HTML entity encoding?
No. HTML encoding (&, <) protects text placed inside HTML. URL encoding (%26, %3C) protects text placed inside a URL. They solve different problems and are not interchangeable.

Last reviewed: September 2026. Figures and formulas are checked against their published sources; see the site's data notes.