What is URL Encoding?
URL encoding (also called percent encoding) is a mechanism for encoding information in a Uniform Resource Identifier (URI). Characters that are not allowed in a URL are converted to one or more byte triplets, each represented by the percent sign (%) followed by two hexadecimal digits. For example, a space becomes %20. This encoding ensures that URLs are transmitted correctly across the internet without ambiguity.
How to Use
- Select Encode or Decode mode using the toggle buttons.
- Paste your text or URL in the input area.
- For encoding, choose between
encodeURIorencodeURIComponent. - Enable Batch mode to process each line separately.
- The output updates in real-time as you type.
- Copy the output using the copy button.
Note: All processing happens in your browser. No data is sent to any server, making this tool safe for encoding sensitive URLs and query parameters.
Features
- Supports both encodeURI and encodeURIComponent
- Batch mode for processing multiple lines
- Real-time encoding/decoding as you type
- Handles all special characters and Unicode
- Copy to clipboard with one click
- Swap input/output for reverse operations
- 100% client-side processing - nothing sent to servers
Common URL Encoded Characters
Below is a reference table of commonly encoded characters. These characters have special meaning in URLs and must be encoded when used in query parameters or path segments.
| Character | Encoded | Description |
|---|---|---|
| Space | %20 | Space character |
| ! | %21 | Exclamation mark |
| # | %23 | Hash / Fragment identifier |
| & | %26 | Ampersand / Query separator |
| = | %3D | Equals sign / Query assignment |
| ? | %3F | Question mark / Query start |
| + | %2B | Plus sign (also represents space in query strings) |
| / | %2F | Forward slash / Path separator |
Use Cases
Query Parameters
Encode values passed in URL query strings to ensure special characters don't break the URL structure.
Form Submissions
HTML forms automatically URL-encode data when submitted via GET or POST methods.
API Development
Properly encode request parameters when building or testing REST APIs and webhooks.
SEO & Analytics
Debug tracking URLs and UTM parameters by encoding/decoding complex URL strings.
This tool is especially useful when working with internationalized domain names (IDN) and non-ASCII characters in URLs, which must be properly encoded to work across all browsers and servers.
FAQ
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URI but preserves characters like :, /, ?, #, [, ]. encodeURIComponent encodes everything except A-Z, a-z, 0-9, -, _, ., !, ~, *, ', (, ). Use encodeURIComponent for query parameter values.
When should I use URL encoding?
URL encoding is needed when passing special characters in URLs, form submissions, query strings, or any data transmitted via HTTP. Characters like spaces, &, =, ? have special meaning in URLs and must be encoded.
What does %20 mean?
%20 is the URL-encoded representation of a space character. The number 20 is the hexadecimal ASCII code for the space character (ASCII 32 in decimal).
Is URL encoding the same as percent encoding?
Yes, URL encoding and percent encoding are the same thing. The term "percent encoding" comes from the use of the percent sign (%) to indicate encoded characters. It is defined in RFC 3986 as the standard way to encode data in URIs.