URL Encoder/Decoder
encode · decode · url components
$ how-to-use
Paste text with special characters and click Encode to get URL-safe output. Or paste an encoded URL string and click Decode to see the original text.
What is URL Encoding?
URLs can only contain a limited set of ASCII characters. Special characters like spaces, ampersands, question marks, and non-ASCII characters (accented letters, emoji, CJK) must be "percent-encoded" — replaced with a % followed by their hex value.
For example, a space becomes %20, an ampersand becomes %26, and the euro sign € becomes %E2%82%AC. Without proper encoding, URLs break or get misinterpreted by browsers and servers.
This tool uses JavaScript's encodeURIComponent() for encoding and decodeURIComponent() for decoding — the standard functions used in web development.
When You Need It
Query Parameters
Values in ?key=value pairs must be encoded. A search for "cats & dogs" becomes ?q=cats%20%26%20dogs.
API Requests
REST API parameters with special characters or non-English text need encoding to transmit correctly.
Redirect URLs
When passing a URL as a parameter (OAuth callbacks, tracking links), the inner URL must be fully encoded.
Debugging
Decode messy encoded URLs from logs or analytics to see what the original query or path was.
FAQ
What's the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL but leaves :, /, ?, # intact. encodeURIComponent encodes everything — use it for individual parameter values. This tool uses encodeURIComponent.
Is my data private?
Yes. All encoding/decoding happens in your browser. Nothing is sent to any server.