URL Encoder/Decoder
Encode and decode URLs in real-time. Supports encodeURIComponent, encodeURI, and RFC 3986 standards. Character breakdown, batch mode, drag & drop. Free, instant, 100% browser-based.
Input
Encoded Output
What is URL Encoding?
URL encoding (percent-encoding) converts characters that are not allowed or have special meaning in URLs into a safe format. Each unsafe character is replaced with a % followed by two hexadecimal digits representing its UTF-8 byte value.
For example, a space becomes %20, an ampersand & becomes %26, and a question mark ? becomes %3F. This ensures URLs are transmitted correctly across the internet without ambiguity.
Encoding Standards Compared
| Standard | Preserves | Encodes | Best For |
|---|---|---|---|
encodeURIComponent |
A-Z a-z 0-9 - _ . ! ~ * ' ( ) |
Everything else including : / ? # & = @ |
Query parameter values, form data |
encodeURI |
: / ? # & = @ + $ , ; and above |
Spaces, non-ASCII, and a few special chars | Complete URLs (preserves structure) |
RFC 3986 |
A-Z a-z 0-9 - _ . ~ |
Everything else including ! * ' ( ) |
Strictest encoding, API signatures (OAuth) |
How to Use — 3 Simple Steps
Choose Your Mode
Click Encode to convert text to URL-safe format, or Decode to convert percent-encoded strings back to readable text. Pick the encoding standard that fits your use case.
Enter Your Text
Type or paste your URL / text in the input panel. You can also upload a .txt file or drag & drop it. Enable Batch mode to process multiple strings at once, one per line.
Copy Your Result
The output updates instantly as you type. Click Copy to copy to clipboard or Download to save as a file. Check the Character Breakdown to see each encoded character.
Common URL-Encoded Characters
| Character | Encoded | Description |
|---|---|---|
| (space) | %20 | Space character |
! | %21 | Exclamation mark |
# | %23 | Hash / fragment identifier |
$ | %24 | Dollar sign |
& | %26 | Ampersand (query separator) |
+ | %2B | Plus sign |
/ | %2F | Forward slash (path separator) |
= | %3D | Equals sign (key=value separator) |
? | %3F | Question mark (query start) |
@ | %40 | At sign |
Pro Tips
Use encodeURIComponent for Query Params
When building URLs with ?key=value pairs, always encode the values with encodeURIComponent. This ensures special characters like & and = in the value don't break the URL structure.
Don't Double-Encode
If your string already contains %XX sequences, decoding and re-encoding will change them. Use the Swap button to quickly check if your string is already encoded.
+ vs %20 for Spaces
In HTML form submissions (application/x-www-form-urlencoded), spaces are encoded as +. In URLs, spaces should be %20. This tool uses %20 for standards compliance.
Use RFC 3986 for OAuth
OAuth signature base strings require strict RFC 3986 encoding. Unlike encodeURIComponent, RFC 3986 also encodes !, ', (, ), and *.
Frequently Asked Questions
What is URL encoding?
URL encoding (also called percent-encoding) converts special characters into a format that can be safely transmitted in a URL. Characters that are not allowed in URLs (like spaces, &, =, ?) are replaced with a percent sign followed by two hexadecimal digits (e.g., space becomes %20).
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL but preserves characters that have special meaning in URLs (like ://?#&=). encodeURIComponent encodes everything except letters, digits, and a few safe characters (- _ . ! ~ * ' ( )). Use encodeURIComponent for query parameters and encodeURI for complete URLs.
When should I use URL encoding?
You should URL-encode any data being passed as URL parameters, form data in GET requests, or any string that will be embedded in a URL. Common use cases include API query strings, redirect URLs, and any user input that will appear in URLs.
What is RFC 3986?
RFC 3986 is the official standard that defines the syntax of URIs (Uniform Resource Identifiers). Its encoding rules are stricter than encodeURIComponent — it also encodes characters like ! ' ( ) * that encodeURIComponent leaves unencoded. This is the safest option for encoding arbitrary data.
Is my data processed on a server?
No. All URL encoding and decoding happens entirely in your browser using JavaScript. No data is sent to any server. Your URLs and text remain completely private.