URL Encoder/Decoder
Encode and decode URLs and query strings
Real-time encoding/decoding
Full UTF-8 support
One-click copy
Clean interface
You're building a search feature, and a user types "Nike Air Max 90 (Women's)" into the search box. You construct the URL, click the link, and... it breaks. The parentheses and apostrophe have corrupted your carefully crafted URL.
Welcome to the world of URL encoding—where perfectly innocent characters turn into landmines for web developers.
The URL Encoder/Decoder converts special characters into URL-safe format (and back again). It's the difference between a working deep link and a 404 error, between a successful OAuth flow and a silent authentication failure.
If you work with APIs, build share links, or debug broken URLs, this tool will save you hours of frustration.
The core problem: URLs can only contain certain ASCII characters. Spaces, ampersands, question marks, and international characters must be converted to a special format—or your links will break in subtle, infuriating ways.
What is URL Encoding?
URL encoding (also called percent encoding) converts characters into a format that URLs can safely transmit. Since URLs only support certain ASCII characters, anything outside this safe set must be encoded.
Special characters are replaced with a percent sign (%) followed by two
hexadecimal digits representing the character's ASCII value. A space becomes
%20, an ampersand becomes %26, and so on.
Characters That Must Be Encoded
| Character | Encoded | Why It's Reserved |
|---|---|---|
| Space | %20 (or +) | Spaces break URLs |
| & | %26 | Separates parameters |
| = | %3D | Separates key-value pairs |
| ? | %3F | Starts query string |
| # | %23 | Starts fragment identifier |
| / | %2F | Path separator |
| + | %2B | Sometimes means space |
What URL Encoding Does NOT Do
Let's be clear about what this isn't:
- NOT encryption: Anyone can decode it instantly
- NOT compression: Usually makes strings longer
- NOT sanitization: Doesn't protect against security issues
It's purely a format conversion for URL compatibility (RFC 3986).
Developer insight: When building URLs programmatically, always use your
language's built-in encoding functions (encodeURIComponent() in JavaScript,
urllib.parse.quote() in Python) rather than manual string replacement. They
handle edge cases you'll miss.
Why People Actually Need This Tool
When URLs break silently due to unencoded special characters, developers can spend hours debugging issues that take seconds to fix with proper encoding.
Here are 6 real situations where this tool saves the day:
-
Building API Requests: User-generated content in URL parameters must be encoded, or the request fails mysteriously.
-
Creating Share Links: Deep links with personalized data (names, messages) need encoding to preserve the exact text.
-
Debugging Broken URLs: When a URL doesn't work, decoding it reveals whether encoding is the culprit.
-
Reading Encoded Data: Server logs and analytics tools show encoded URLs. Decoding makes them human-readable.
-
Testing OAuth Flows: Redirect URIs and state parameters must be properly encoded for authentication to work.
-
Email Marketing Links: Tracking parameters with special characters (especially @ symbols in email addresses) need encoding.
How to Use the URL Encoder/Decoder
This takes about 5 seconds:
- Choose Mode: "Encode" converts text to URL-safe format; "Decode" converts it back
- Paste Your Text: Enter the string you want to process
- Get Instant Results: Conversion happens as you type
- Copy the Output: Click the copy button and paste it wherever you need it
This tool processes everything locally in your browser—your URLs, including any sensitive parameters like API tokens or authentication data, never leave your device.
Understanding the Output
When you encode a full URL like:
https://example.com/search?q=hello world&lang=en
The result becomes:
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den
Or if you just encode the query value (recommended):
hello world → hello%20world
Best practice: Only encode the values in your query parameters, not the
entire URL structure. Encoding the full URL (including :// and /) will
break it when you try to use it.
Real-World Use Cases
Here's exactly how developers use this tool:
1. E-commerce Search Implementation
Context: You're building search for an online store.
Problem: Users search for "Nike Air Max 90 (Women's)" but the URL breaks—parentheses and apostrophe aren't URL-safe.
Solution: Encode the search term: Nike%20Air%20Max%2090%20%28Women%27s%29
Outcome: Search works correctly, users can share and bookmark results.
2. OAuth Callback Configuration
Context: You're implementing Google OAuth for your app.
Problem: Your callback URL https://myapp.com/auth?source=google&redirect=/dashboard isn't working.
Solution: Properly encode the redirect URI before sending it to Google.
Outcome: OAuth flow completes successfully, users land on the correct page.
3. Analytics Debug Mode
Context: You're analyzing traffic from an email campaign.
Problem: The utm_content parameter shows %2520special%2520offer in your analytics.
Solution: Decoding reveals double-encoding (space → %20 → %2520). You fix the campaign links.
Outcome: Future campaigns track correctly with accurate data.
4. API Integration with International Characters
Context: You're calling a weather API that accepts city names.
Problem: Queries for "SĂŁo Paulo" or "ZĂĽrich" fail silently.
Solution: Encode the city names: S%C3%A3o%20Paulo, Z%C3%BCrich
Outcome: International lookups work correctly across all locales.
5. Building Mailto Links
Context: You want to pre-populate an email subject and body.
Problem: Line breaks and special characters in the body break the mailto link.
Solution: Encode subject and body: mailto:?subject=Hello%20World&body=Please%20review%3A%0A%0A
Outcome: Clicking the link opens an email with the exact intended content.
6. Troubleshooting Webhook Failures
Context: Your Stripe payment webhook sometimes fails to parse.
Problem: Some customer names contain & or = that break JSON parsing.
Solution: Decode the payload to see the raw data.
Outcome: You identify the edge case and add proper handling.
7. Creating App Deep Links
Context: You're building a mobile app with deep link support.
Problem: A link to myapp://product/coffee & tea set doesn't open the correct screen.
Solution: Encode the product name: myapp://product/coffee%20%26%20tea%20set
Outcome: Deep links work reliably for all product names.
Common Mistakes and How to Avoid Them
If you encode an already-encoded string, you get corruption. A space becomes
%20, which becomes %2520 if encoded again. Always verify your data isn't
already encoded.
🎯 Double Encoding
%20 into %2520.🎯 Encoding the Entire URL
https://example.com?q=test which breaks the protocol and path structure.🎯 Forgetting Reserved Characters
search=black & white in a URL, where & is interpreted as a parameter separator.🎯 Using + Instead of %20 Incorrectly
+ for spaces in URL paths (e.g., /products/black+coffee).🎯 Not Handling UTF-8 Characters
José or 北京.🎯 Encoding Empty Strings
Debugging trick: If a URL isn't working and you're not sure why, paste the entire URL into the decoder. This reveals any hidden encoding issues (like double-encoded spaces) that are invisible when looking at the raw string.
Privacy and Data Handling
This URL Encoder/Decoder processes everything locally in your browser. Your URLs, query parameters, API endpoints, and any data you encode or decode never leave your device.
There's no server-side processing, no logging, and no data retention. This matters when working with URLs containing authentication tokens, API keys, or personal information—your sensitive data stays private.
Conclusion
URL encoding is fundamental for anyone building web applications. While it's a simple concept, getting it wrong causes frustrating bugs that are surprisingly hard to diagnose.
Use this tool whenever you're unsure about encoding, debugging broken links, or working with international characters. It's faster than writing code, more reliable than guessing, and processes everything privately in your browser.
Bookmark this page—you'll need it more often than you think.