URL Encoder / Decoder
Encode text to be safely included in a URL, or decode percent-encoded URLs back to readable text.
Text to Encode
Encoded Output
About URL Encoding
URL encoding (also called percent-encoding) replaces unsafe ASCII characters in a URL with a % followed by two hexadecimal digits. For example, a space becomes %20 or + in query strings.
When to use encodeURIComponent vs encodeURI
encodeURIComponentencodes everything except letters, digits, and-_.!~*'(). Use this for encoding individual query parameter values.encodeURIpreserves characters that have special meaning in a URL (: / ? # [ ] @ ! $ & ' ( ) * + , ; =). Use this for encoding a complete URL.