Encode text for safe use in URLs or decode percent-encoded strings instantly with this free online tool. Features smart auto-detection, URL component breakdown, and query string parsing. All processing happens in your browser — your data never leaves your device.
URL encoding (also called percent-encoding) converts characters into a format safe for URLs. Special characters like spaces, ampersands, and non-ASCII characters are replaced with a percent sign followed by two hexadecimal digits (e.g., space becomes %20). This ensures URLs work correctly across all browsers and servers, as URLs can only contain a limited set of ASCII characters.
Working with URL encoding in your code? Here's how to encode and decode in popular languages:
Enter your text in the input panel. If auto-detect mode is enabled, the tool will recognize it as plain text and encode it automatically. You can also manually select "Encode" mode using the toggle or press 'E' on your keyboard.
encodeURIComponent encodes all special characters, making it safe for query parameter values. encodeURI preserves URL structure characters (like :, /, ?) so you can encode a full URL without breaking it. This tool uses encodeURIComponent behavior, which is more common for encoding individual values.
Both represent spaces in URLs, but they come from different standards. %20 follows RFC 3986 (URI standard), while + follows the application/x-www-form-urlencoded format used by HTML forms. Most servers accept both, but %20 is the safer choice for general URL encoding.
Reserved characters that have special meaning in URLs must be encoded when used as data: ! # $ & ' ( ) * + , / : ; = ? @ [ ]. Unsafe characters like spaces, < > | \ and non-ASCII characters also need encoding. Only unreserved characters (A-Z, a-z, 0-9, - _ . ~) are safe without encoding.
Yes. All encoding and decoding happens entirely in your browser using JavaScript. No data is ever sent to any server. Your last input and mode preference are saved in your browser's localStorage for convenience.
More DevDen tools: JSON Formatter · Base64 Encoder/Decoder · Unix Timestamp Converter