Encode text for safe inclusion in URLs by converting special characters to percent-encoded format, or decode percent-encoded URLs back to human-readable text. Uses JavaScript's encodeURIComponent for standards-compliant encoding. Everything runs in your browser — no data is sent to any server.
Enter text to encode it for safe URL transmission.
Paste URL encoded text to decode it back to the original text.
URL encoding, also known as percent-encoding, is defined by RFC 3986. It ensures that URLs contain only the limited set of characters allowed in the URI syntax. Characters outside the unreserved set (A-Z, a-z, 0-9, -, _, ., ~) are replaced with one or more %XX sequences, where XX is the hexadecimal value of the byte.
This tool uses JavaScript's encodeURIComponent function, which encodes everything except the characters A-Z a-z 0-9 - _ . ! ~ * ' ( ). This makes it ideal for encoding individual query parameter values, path segments, and fragment identifiers.
Decoding reverses this process by scanning for %XX sequences and converting them back to the original characters. Multi-byte UTF-8 sequences are reassembled to restore Unicode characters faithfully.
Safely pass user input, search terms, or special characters in URL parameters without breaking the URL structure.
Encode parameters before sending them to RESTful APIs to ensure special characters are transmitted correctly.
Decode URLs from server logs, analytics tools, or browser network tabs to understand the original values being passed.
Handle non-ASCII characters such as accented letters, CJK characters, and Arabic script in URLs.
URL encoding (also called percent-encoding) is the process of converting special characters into a %XX hex format so they can be safely transmitted within a URL. Characters that have special meaning in URLs (like &, =, ?) or are not allowed (like spaces) must be percent-encoded to avoid ambiguity.
encodeURI preserves URL structure characters such as :, /, ?, and #, making it suitable for encoding a complete URL while keeping its structure intact. encodeURIComponent encodes everything except unreserved characters (A-Z a-z 0-9 - _ . ! ~ * ' ( )), making it the right choice for encoding individual parameter values.
The space character (ASCII 0x20) is not in the unreserved character set, so it must be percent-encoded as %20 for safe inclusion in URLs. In HTML form submissions using the application/x-www-form-urlencoded content type, spaces may also appear as + signs, but %20 is the standard representation in URIs.
Yes. Unicode characters are first encoded into their UTF-8 byte representation, then each byte is individually percent-encoded. For example, the character é (U+00E9) becomes %C3%A9 because its UTF-8 encoding is the two-byte sequence 0xC3 0xA9. JavaScript's encodeURIComponent handles this automatically.