URL Encoder / Decoder
Encode and decode URL strings using percent-encoding. Supports component and full URL modes.
Scope:
Plain text / URL
Encoded output
Output will appear here...
Component mode — encodes all special chars including
: / ? # @. Use for individual query parameter values.Component vs Full URL encoding
| Function | Preserves | Encodes | Use when |
|---|---|---|---|
encodeURIComponent | A–Z a–z 0–9 - _ . ! ~ * ' ( ) | Everything else including : / ? # @ | Encoding a single query parameter value |
encodeURI | A–Z a–z 0–9 - _ . ! ~ * ' ( ) ; , / ? : @ & = + $ # | Spaces and non-ASCII | Encoding a complete URL |
Common encoded characters
| Character | Encoded | Character | Encoded |
|---|---|---|---|
| %20 | ! | %21 |
" | %22 | # | %23 |
& | %26 | ' | %27 |
+ | %2B | / | %2F |
= | %3D | ? | %3F |
@ | %40 | [ | %5B |
Frequently Asked Questions
What is percent encoding?
Percent encoding (also called URL encoding) is a mechanism for encoding special characters in URLs. Each character is replaced with a % followed by two hexadecimal digits representing the character's ASCII code.
When should I use Component vs Full URL mode?
Use Component when encoding a single value that will become part of a URL (e.g., a search query). Use Full URL when you have a complete URL and only want to fix non-ASCII characters or spaces without breaking the URL structure.