How to use the URL Encode & Decode
- 1
Paste or type your input.
- 2
Choose the operation and options.
- 3
Copy the output or download it as a file.
Component vs full URL
Component mode (encodeURIComponent) encodes everything except letters, digits and - _ . ! ~ * ' ( ), which is right for a single query value. Full URL mode leaves :/?#&= intact so a complete URL stays usable.
Why URLs need encoding
URLs may only contain a limited set of characters. Spaces, accented letters and symbols such as & = ? # have to be written as percent codes: a space becomes %20, & becomes %26 and é becomes %C3%A9 (its two UTF-8 bytes). Without encoding, a value like "salt & pepper" in a query string would be cut off at the &, because & separates parameters.
Examples
Encoding the search term "50% off & free" as a query value gives 50%25%20off%20%26%20free. Decoding https://example.com/?q=caf%C3%A9 gives https://example.com/?q=café. If a value has been encoded twice you'll see %2520 instead of %20; decode it twice to get the original back.
Which characters need encoding?
RFC 3986 leaves 66 characters unencoded everywhere: the letters A–Z and a–z, the digits 0–9 and the four symbols - (dash), _ (underscore), . (full stop) and ~ (tilde). Inside a value, the characters with a special meaning in URLs are percent-encoded: a space becomes %20, / becomes %2F, ? becomes %3F, # becomes %23, + becomes %2B, & becomes %26 and = becomes %3D. Component mode also leaves ! * ' ( ) as they are, as JavaScript's encodeURIComponent does; they're safe in query values. Letters outside English, emoji and other non-ASCII characters are first turned into UTF-8 bytes, and each byte becomes its own %XX code.
Frequently asked questions
Is my data sent to a server?
No. Everything runs in your browser as you type. Nothing is uploaded or logged, so it is safe to paste API responses, tokens and private text.
Does a dash (-) need to be URL encoded?
No. The dash is one of the unreserved characters, so it stays as - in both Component and Full URL mode, and so do the underscore, full stop and tilde. %2D also decodes to a dash, so an over-encoded link still works, but there is no need to encode it.
Should a space be %20 or +?
In paths and most modern code, %20. The + form comes from HTML form submissions (application/x-www-form-urlencoded) and is only understood in query strings. When decoding, this tool treats + as a space in query values.
Which mode should I use?
Use component mode for a single value you're inserting into a URL, such as a search term or a redirect address. Use full URL mode when you have a whole URL and only want to fix illegal characters while keeping its structure.
Why do I see %2520 in a link?
The text was encoded twice: % itself was encoded as %25. Decode once to get %20, and again to get the space.
Something not working, or missing a setting you need? Report a problem or request a tool.