URL Encoder/Decoder
Encode or decode URLs and special characters with this free online tool.
URL encoding converts characters into a format that can be transmitted over the Internet. It replaces unsafe ASCII characters with a '%' followed by hexadecimal digits.
This tool allows you to:
- Encode text for use in URLs
- Decode encoded URL strings
- Choose between standard and component encoding
About URL Encoding
What is URL Encoding?
URL encoding, also known as Percent-encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI). It is used to convert characters that are not allowed in a URL into a format that is acceptable for a URL.
When to Use URL Encoding
- When sending data in URL parameters
- When handling user input that will be part of a URL
- When working with APIs that require URL-safe parameters
- When creating links with special characters in them
URL Encoding vs. Component Encoding
There are two main types of URL encoding:
- Standard URL Encoding: Encodes spaces as '+' and preserves some characters like '/', '?', ':', '@', etc. that have special meaning in URLs. In JavaScript, this is similar to the encodeURI() function.
- Component Encoding: More aggressive encoding that converts all special characters to percent-encoded format, including '/', '?', etc. In JavaScript, this is similar to the encodeURIComponent() function. Use this when encoding individual components of a URL, such as query parameters.
Common URL Encoded Characters
| Character | URL Encoded |
|---|---|
| Space | %20 or + |
| ! | %21 |
| " | %22 |
| # | %23 |
| $ | %24 |
| % | %25 |
| & | %26 |
| ' | %27 |
| ( | %28 |
| ) | %29 |
| * | %2A |
| + | %2B |
| , | %2C |
| / | %2F |
| : | %3A |
| ; | %3B |
| = | %3D |
| ? | %3F |
| @ | %40 |
| [ | %5B |
| ] | %5D |