URL Encoder / Decoder
Uses encodeURI / decodeURI — preserves characters that are part of URL syntax (://?#[]@!$&'()*+,;=).
Free Online URL Encoder and Decoder
Encode or decode URLs and URL components instantly with this free online tool. URL encoding replaces unsafe characters with a percent sign followed by two hexadecimal digits (e.g. a space becomes %20). This is essential when constructing query strings, passing data in URLs, or working with APIs that require properly formatted URIs.
How to Use
Paste your URL or text into the input area above. Choose between "Full URL" mode (which preserves characters like :, /, ?, and #) or "Component" mode (which encodes everything except unreserved characters). Then click "Encode" or "Decode" to see the result. Use the copy button to quickly copy the output to your clipboard.
FAQ
What is the difference between encodeURI and encodeURIComponent?
encodeURIis designed for encoding a complete URI. It does not encode characters that have special meaning in a URL such as :, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, and =. encodeURIComponentencodes everything except A–Z, a–z, 0–9, -, _, ., and ~. Use encodeURIComponent when encoding a value that will be placed inside a query parameter, and encodeURI when encoding a full URL where you want to preserve its structure.
When should I use URL encoding?
URL encoding should be used whenever you include user input or special characters in a URL. Common scenarios include building query strings for API requests, constructing redirect URLs, embedding data in links, and ensuring that characters like spaces, ampersands, and equals signs are transmitted correctly without breaking the URL structure.