URL Encoder/Decoder
Encode and decode URLs with percent-encoding.
Quick examples
URL encoder and decoder: percent-encoding explained
URLs (Uniform Resource Locators) can only contain a limited set of ASCII characters. When a URL needs to include special characters like spaces, accents, or characters from other languages, these must be converted to a safe format called percent-encoding.
JavaScript's encodeURIComponent function encodes all characters except letters, digits, and the characters - _ . ~ which are safe according to the RFC 3986 standard. This is different from encodeURI, which does not encode characters that are part of the URL structure.
Our tool processes everything locally in your browser, without sending data to external servers. You can encode complete URLs, individual parameters, or any text you need to safely include in a URL.
Frequently asked questions
What is percent-encoding?
Percent-encoding (also called URL encoding) is a mechanism for representing special characters in a URL. Each unsafe character is replaced by a % sign followed by two hexadecimal digits representing the byte value in UTF-8. For example, the space is encoded as %20, and the character á as %C3%A1.
When do I need to encode a URL?
You need to encode a URL when you include user data in query parameters (query strings), when you submit forms via GET, when you build URLs dynamically in code, or when the URL contains non-ASCII characters like accents or characters from other languages. Without encoding, the browser or server could interpret these characters incorrectly.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete URL but preserves structural characters like /, :, ?, #, &, and =. encodeURIComponent encodes all special characters without exception. Use encodeURI for complete URLs and encodeURIComponent for individual parameter values. This tool uses encodeURIComponent, ideal for encoding parameter values.
Want to learn more? Read our complete guide →