Free Online Tools
Encode and decode URLs instantly with our free online tool. Perfect for web development, API testing, and SEO work. Handle special characters and create URL-safe strings effortlessly!
Encode Component: Encodes special characters in URL parameters, preserving URL structure (://?#). Use for query strings, parameters, and path segments.
Encode Full URL: Encodes all special characters including URL structure characters. Use for embedding URLs as text.
URL decoding converts percent-encoded characters back to their original form. It reverses the encoding process, making URLs human-readable again.
Here are the most frequently encoded characters in URLs:
| Character | Encoded | Description |
|---|---|---|
| Space | %20 or + | Whitespace character |
| ! | %21 | Exclamation mark |
| " | %22 | Quotation mark |
| # | %23 | Hash/pound sign |
| $ | %24 | Dollar sign |
| % | %25 | Percent sign |
| & | %26 | Ampersand |
| ' | %27 | Single quote |
| ( | %28 | Opening parenthesis |
| ) | %29 | Closing parenthesis |
| + | %2B | Plus sign |
| , | %2C | Comma |
| / | %2F | Forward slash |
| : | %3A | Colon |
| ; | %3B | Semicolon |
| = | %3D | Equals sign |
| ? | %3F | Question mark |
| @ | %40 | At sign |
Real-time encoding and decoding with immediate results. No waiting, no processing delays.
RFC 3986 compliant URL encoding that works correctly with all web standards.
Choose between component encoding (for parameters) or full URL encoding as needed.
One-click copy to clipboard for quick use in your projects and applications.
All processing happens in your browser. No data sent to servers, completely secure.
No registration, no limits, no watermarks. Encode unlimited URLs forever free.
URL encoding (also called percent encoding) is a mechanism for converting special characters in URLs to a format that can be transmitted over the Internet. URLs can only contain a limited set of characters from the ASCII character set.
When a character is not available in this set or has special meaning in a URL, it must be encoded. URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits representing the character's ASCII code.
encodeURIComponent() - Encode Component:
Encodes all characters except: A-Z a-z 0-9 - _ . ! ~ * ' ( )
Use this for encoding individual URL components like query parameters, path segments, or any value that will be part of a URL.
Input: search?q=hello world&category=tech Output: search?q=hello%20world&category=tech
encodeURI() - Encode Full URL:
Encodes special characters but preserves URL structure characters like : / ? # [ ] @ ! $ & ' ( ) * + , ; =
Use this when you want to encode an entire URL while keeping it functional as a URL.
Input: https://example.com/search?q=hello world Output: https://example.com/search?q=hello%20world
1. Search Query with Spaces:
Original: https://example.com/search?q=web development Encoded: https://example.com/search?q=web%20development
2. URL with Special Characters:
Original: https://example.com/article?title=Top 10 Tips & Tricks! Encoded: https://example.com/article?title=Top%2010%20Tips%20%26%20Tricks!
3. Email Mailto Link:
Original: mailto:test@example.com?subject=Hello World&body=How are you? Encoded: mailto:test@example.com?subject=Hello%20World&body=How%20are%20you%3F
4. Multiple Parameters:
Original: api.example.com/data?name=John Doe&age=25&city=New York Encoded: api.example.com/data?name=John%20Doe&age=25&city=New%20York
5. JSON Data in URL:
Original: api/search?filter={"status":"active","type":"user"}
Encoded: api/search?filter=%7B%22status%22%3A%22active%22%2C%22type%22%3A%22user%22%7D
You can easily implement URL encoding in your JavaScript code:
// Encode a URL component (recommended for parameters)
const encoded = encodeURIComponent('hello world!@#');
console.log(encoded); // hello%20world!%40%23
// Decode a URL component
const decoded = decodeURIComponent('hello%20world!%40%23');
console.log(decoded); // hello world!@#
// Encode full URL (preserves URL structure)
const fullUrl = encodeURI('https://example.com/search?q=hello world');
console.log(fullUrl); // https://example.com/search?q=hello%20world
// Decode full URL
const decodedUrl = decodeURI('https://example.com/search?q=hello%20world');
console.log(decodedUrl); // https://example.com/search?q=hello world
Q: What's the difference between URL encoding and HTML encoding?
A: URL encoding is for URLs and uses % followed by hex codes. HTML encoding is for HTML content and uses entities like or €.
Q: Can I encode entire URLs with parameters?
A: Yes! Use the "Encode Full URL" option which preserves URL structure while encoding special characters.
Q: Why do I see %20 instead of + for spaces?
A: Both represent spaces. %20 is the standard percent-encoding, while + is used in query strings for historical reasons.
Q: Is there a limit to the URL length?
A: The tool itself has no limit, but browsers typically support URLs up to 2048 characters. For longer data, consider using POST requests.
Q: Will encoding affect my URL's SEO?
A: Properly encoded URLs are fine for SEO. However, use clean, descriptive URLs when possible rather than heavily encoded ones.