URL Encoder / Decoder
Encode or decode URLs and special characters instantly β essential for web developers, API testing, and form submissions.
π Related Developer Tools
What is URL Encoding?
URL encoding (also known as percent-encoding) is a mechanism for encoding special characters in URLs. URLs are limited to a specific set of characters: letters (A-Z, a-z), numbers (0-9), and a few special characters ($ - _ . + ! * ' ( ) ,). All other characters must be encoded using percent signs (%) followed by two hexadecimal digits representing their ASCII code.
For example, a space character becomes %20 (or sometimes + in form data), an ampersand (&) becomes %26, and a question mark (?) becomes %3F. URL encoding ensures that the URL can be safely transmitted over the internet without being misinterpreted by browsers or servers.
Our URL Encoder/Decoder handles both encoding (converting special characters to percent-encoded format) and decoding (converting percent-encoded strings back to their original form). All processing happens locally in your browser β your data never leaves your device.
How to Use This URL Encoder/Decoder
Step-by-Step Guide
- Enter a URL or text string in the input field
- Click "Encode URL" to convert special characters to percent-encoded format
- Click "Decode URL" to convert percent-encoded strings back to readable text
- Click "Clear" to reset both input and output fields
- Copy the result to your clipboard with one click
π‘ Pro Tips
- Use encoding when sending special characters in URLs (API calls, query parameters)
- Use decoding when reading encoded URLs from logs or API responses
- URL encoding is NOT encryption β it's for safe transmission, not security
- Works with UTF-8 characters (emojis, accents, non-Latin scripts)
- Perfect for debugging API call issues with spaces and special characters
π‘ Example: "Hello World!" encodes to "Hello%20World%21". "https://example.com?search=hello%20world" decodes to "https://example.com?search=hello world".
Common URL Encoded Characters Reference
Space
%20 (or + in form data)
! (Exclamation)
%21
" (Double quote)
%22
# (Hash)
%23
$ (Dollar)
%24
% (Percent)
%25
& (Ampersand)
%26
' (Single quote)
%27
( (Left parenthesis)
%28
) (Right parenthesis)
%29
* (Asterisk)
%2A
+ (Plus)
%2B
, (Comma)
%2C
/ (Slash)
%2F
: (Colon)
%3A
; (Semicolon)
%3B
< (Less than)
%3C
= (Equals)
%3D
> (Greater than)
%3E
? (Question mark)
%3F
@ (At symbol)
%40
[ (Left bracket)
%5B
] (Right bracket)
%5D
Real-World URL Encoding Use Cases
π Search Engine Queries
When you search for "coffee shop" on Google, the space is encoded as %20: https://google.com/search?q=coffee%20shop
π API Parameters
API calls often include special characters in query parameters. Encoding ensures the request is parsed correctly by the server.
π§ Mailto Links
Mailto links encode subject lines and body text: mailto:user@example.com?subject=Hello%20World
π International URLs (IDN)
Non-ASCII characters (Chinese, Arabic, etc.) are encoded as punycode for domain names and percent-encoding for paths.
π± Deep Links
Mobile app deep links use URL encoding to pass parameters safely between apps.
URL Encoding vs HTML Encoding vs Base64
URL Encoding
Purpose: Safe transmission in URLs. Uses % signs. Example: space β %20. Best for: query parameters, path segments.
HTML Encoding
Purpose: Safe display in HTML. Uses & entities. Example: < β <. Best for: preventing XSS attacks.
Base64
Purpose: Binary to text encoding. Uses A-Za-z0-9+/=. Best for: email attachments, data URLs.
π Important: URL encoding is NOT the same as HTML encoding. Use URL encoding for URLs, HTML encoding for web pages to prevent XSS attacks.
Frequently Asked Questions
1. Why do spaces sometimes appear as + and sometimes as %20?
In application/x-www-form-urlencoded (form submissions), spaces are encoded as +. In standard URL encoding (RFC 3986), spaces are encoded as %20. Most modern systems accept both, but %20 is the official standard.
2. Does this tool support UTF-8 characters?
Yes! Our URL encoder/decoder uses JavaScript's built-in encodeURIComponent/decodeURIComponent, which fully supports UTF-8 characters like emojis (π), accented letters (Γ©, ΓΌ, Γ§), and non-Latin scripts (δ½ ε₯½).
3. Is URL encoding the same as encryption?
No β URL encoding is NOT encryption. It's simply a way to represent special characters so they can be transmitted safely. Anyone can decode a URL-encoded string easily. Use HTTPS for security.
4. Why do I sometimes see double-encoded URLs?
Sometimes developers accidentally encode an already-encoded URL. Example: %20 becomes %2520 (% is encoded as %25). Our tool can decode both single and double encoding correctly.
5. Is my URL data stored or tracked?
Absolutely not. All encoding/decoding happens entirely within your browser using JavaScript. ToolHub does not store, track, or transmit any URLs or data you enter. Complete privacy guaranteed.
6. What characters are safe in URLs without encoding?
Safe characters: A-Z, a-z, 0-9, and the following special characters: $ - _ . + ! * ' ( ) ,. All other characters (including spaces, &, ?, #, /, etc.) should be encoded for safety.
7. Can I encode an entire URL including http://?
Yes, but be careful! Encoding the colon (:) and slashes (//) would break the URL structure. For full URLs, encode only the query parameter values, not the base URL. Use our tool selectively.
8. Does this tool work offline?
Yes β once the page loads, the URL encoder/decoder works completely offline. No internet connection required.
Quick URL Encoding Examples
"Hello World"
Encoded: Hello%20World
"name=John Doe&age=30"
Encoded: name%3DJohn%20Doe%26age%3D30
"https://example.com/path?q=hello world"
Encoded: https%3A%2F%2Fexample.com%2Fpath%3Fq%3Dhello%20world
"Hello δΈη"
Encoded: Hello%20%E4%B8%96%E7%95%8C
"email@example.com"
Encoded: email%40example.com
"100% Complete"
Encoded: 100%25%20Complete
π Other Developer Tools You Might Need
Developer Note: Always encode user input before including it in URLs to prevent injection attacks and ensure proper parsing by browsers and servers.