URL Encoder / Decoder
Encode and decode URLs instantly. Supports encodeURIComponent and full URI encoding. 100% client-side.
All processing is done entirely in your browser. No data is sent to any server.
What is URL Encoding (Percent Encoding)?
URL encoding, also known as percent encoding, converts characters that are not allowed in URLs into a safe format using the % symbol followed by two hexadecimal digits. Defined in RFC 3986, it allows special characters, spaces, and non-ASCII text (such as Korean or Chinese) to be safely included in a URL. For example, a space becomes %20, and the Korean character 가 becomes %EA%B0%80.
Which mode should I use?
There are two URL encoding modes. Full URI mode (encodeURI) encodes an entire URL while preserving its structural characters like ://, ?, and &. Use this when you need to safely pass a complete URL. Component mode (encodeURIComponent) is designed to encode individual values such as a query parameter (?q=search+term). It encodes all characters including structural ones, so applying it to a full URL will break the URL structure and prevent browsers from recognizing it as a valid address.
encodeURIComponent vs encodeURI
| Item | Component | Full URI |
|---|---|---|
| Preserved characters | A–Z a–z 0–9 - _ . ! ~ * ' ( ) | Above + URL structure chars (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) |
| Use case | Query parameter values, form data | Encoding an entire URL while preserving its structure |
Commonly Encoded Characters
| Char | Encoded | Note |
|---|---|---|
space | %20 | Also written as + in form encoding |
& | %26 | Query string separator |
= | %3D | Key=value separator |
# | %23 | Fragment identifier |
+ | %2B | Plus sign (not space) |
/ | %2F | Path separator |
? | %3F | Query start |
@ | %40 | Email, auth info |