How to use the URL encoder / decoder
- 1Choose Action: Encode, Decode or Break down URL.
- 2For encoding and decoding, pick the Mode: Component for a single value such as a query parameter, Full URL to keep
/ ? & =intact, or Form data to write spaces as+. - 3Paste text into Text or URL; the result updates as you type. Tick Each line separately to process a list.
- 4If a decoded result still contains
%25or%20, tick Decode until nothing changes to undo double encoding. Press Copy or Use as input.
Example
café & croissants
caf%C3%A9%20%26%20croissants
Mode: Component. é is two UTF-8 bytes (C3 A9), the space is %20 and & is %26. Form data mode gives caf%C3%A9+%26+croissants.
Encode vs decode
URLs may only contain a limited set of ASCII characters. Everything else is percent-encoded (RFC 3986): the character's UTF-8 bytes are written as % plus two hex digits. A space becomes %20, é becomes %C3%A9, and € becomes %E2%82%AC.
Encode when you put text into a URL: a search term, a redirect target, a file name. Decode to read a URL you were given, such as a tracking link full of %2F and %3D. Decoding reports a broken sequence (like %E9 on its own, which isn't valid UTF-8) with its position and leaves it as it is instead of failing.
encodeURIComponent vs encodeURI
| Character | Component (encodeURIComponent) | Full URL (encodeURI) |
|---|---|---|
| space | %20 | %20 |
/ ? # & = : | encoded (%2F %3F %23 %26 %3D %3A) | kept |
é | %C3%A9 | %C3%A9 |
A-Z a-z 0-9 - _ . ! ~ * ' ( ) | kept | kept |
Use Component for one value going into a URL, because a & or = inside the value would otherwise split it: ?q= + fish & chips must become ?q=fish%20%26%20chips. Use Full URL when you have a whole address with spaces or accents and want to keep its structure. Encoding a full URL in Component mode gives https%3A%2F%2F…, which is only right when the URL itself is a parameter value.
Spaces: %20 or +
In a URL path a space is always %20. In a query string, HTML forms submitted with application/x-www-form-urlencoded write spaces as +, and most servers decode + back to a space there. Form data mode does exactly that, in both directions: it encodes spaces as +, and when decoding it turns + into a space before decoding %XX.
In Component decoding a + stays a plus sign, which is correct for paths and for APIs that use %20. If decoded text shows + where words should be, switch to Form data.
Breaking a URL into parts
Break down URL splits an address into scheme, host, port, path (and each path segment), query and fragment, and lists every query parameter with both its raw and decoded value. For https://example.com/search?q=caf%C3%A9+au+lait&page=2#results it shows q = café au lait, page = 2 and the fragment results. Passwords in URLs are hidden. This makes long marketing links readable and shows exactly which parameters a page receives. To check where a link finally lands, use the redirect checker.
Double-encoding problems
Encoding something that is already encoded turns % into %25: a space becomes %20, then %2520, then %252520. It happens when two layers of code each encode a value (a CMS and a plugin, or a redirect inside a tracking link). Symptoms are URLs containing %25 and pages showing %20 instead of spaces. Tick Decode until nothing changes to peel off every layer; the footer says how many rounds it took. Then fix the code so the value is encoded exactly once, at the point where it is put into the URL.
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
