URL Encode / Decode
How to Use
Type or paste text into the input area to instantly URL-encode or decode it. Use the toggle to switch between Encode and Decode mode. Click the Copy button to copy the output to your clipboard.
What Is URL Encoding
URL encoding (also known as percent-encoding) converts characters that are not allowed in URLs into a %XX format. Spaces become %20, and non-ASCII characters such as Japanese or emoji are encoded as their UTF-8 byte sequences. It is widely used in web form submissions, API requests, and building query string parameters.
Use Cases
- Building query strings — correctly construct URLs with parameter values containing special or non-ASCII characters
- Encoding form data — prepare POST request data in application/x-www-form-urlencoded format
- API parameter handling — safely encode parameters passed to REST API endpoints
- Deep linking with special characters — properly encode URL schemes containing special or multibyte characters
Reserved URL Characters
RFC 3986 defines reserved characters that have structural meaning in URLs. The characters : / ? # [ ] @ serve as delimiters between URL components, while ! $ & ' ( ) * + , ; = function as sub-delimiters. When these characters appear as data rather than structure, they must be percent-encoded. For example, to include "C++ & Java" in a search query, + must become %2B and & must become %26, otherwise the URL will be misinterpreted.
encodeURI vs encodeURIComponent
JavaScript provides two encoding functions. encodeURI() encodes an entire URL and preserves structural characters (: / ? # etc.). encodeURIComponent() encodes a single parameter value and encodes nearly all non-alphanumeric characters, including reserved ones. The rule of thumb: use encodeURIComponent() for query parameter values, and encodeURI() for complete URLs.
Privacy
All encoding and decoding happens entirely in your browser. Your data is never sent to a server, stored, or logged. You can safely process sensitive content such as API keys, tokens, or personal information.