URL encoding, explained
What is URL encoding?+
URL encoding, also called percent-encoding, replaces characters that are unsafe or reserved in a URL with a percent sign followed by their hex byte value. A space becomes %20 and an ampersand becomes %26, so the value survives inside a link.
What is the difference between Component and Full URL mode?+
Component mode uses encodeURIComponent and escapes every reserved character, including : / ? & = and #. Full URL mode uses encodeURI and leaves those structural characters alone, so an entire address stays usable.
Which mode should I use?+
Use Component for a single piece of a URL, such as a query value or a path segment you are inserting. Use Full URL when you have a complete address and only want to fix spaces and other unsafe characters without breaking its structure.
Why did decoding fail?+
Decoding throws when the text contains a broken percent sequence, like a stray "%" or "%zz" that is not a valid hex byte. Fix or remove the bad sequence, or switch modes if the string was encoded a different way.
Is this tool free and private?+
Yes. It is completely free with no login, and all encoding and decoding happen in your browser. Nothing you paste is sent anywhere.
Should a space be encoded as %20 or +?+
Use %20. It is correct everywhere in a URL. A plus sign only means a space inside an HTML form query string, and in a path it stays a literal plus. This tool always encodes spaces as %20.
Which characters never need encoding?+
Letters, digits, and the four marks - _ . ~ are unreserved characters in RFC 3986 and are always safe as they are. Characters such as / ? # & = have special meanings in a URL, so they must be encoded when they appear inside a value.
Related tools
All tools βAlso from Digital Den
More in General Tools.
Need something custom built?
The studio behind this free tool builds custom bots, game servers and websites.