URL Encoder / Decoder
encode and decode URL percent-encoding for query strings and paths
Try it now — free, instant, no signup
Paste a raw query string like name=John Doe&city=São Paulo and get back name=John%20Doe&city=S%C3%A3o%20Paulo, percent-encoded and safe to append to any endpoint. Unlike running encodeURIComponent() in a browser console, this tool exposes the distinction between full URL encoding and component-level encoding separately, which is the detail that trips up integrations when a parameter value itself contains reserved characters like & or =.
What is URL Encoder / Decoder?
URL Encoder / Decoder converts characters that are illegal or reserved in URLs into their percent-encoded equivalents per RFC 3986. Feed it /search?q=hello world&lang=日本語 and it returns /search?q=hello%20world&lang=%E6%97%A5%E6%9C%AC%E8%AA%9E. Each non-ASCII character is UTF-8 encoded first, then each resulting byte is written as a %XX sequence.
Reach for this instead of a browser console's encodeURIComponent() when you want encoded and decoded output side by side without writing throwaway code, or when you need to verify which characters a specific encoding mode leaves untouched. Postman's pre-request scripts can do this too, but they require JavaScript knowledge. For bulk decoding of access logs, grep combined with printf '%b' in bash is faster.
The most common confusion: spaces encode as %20 under RFC 3986, but as + under application/x-www-form-urlencoded, the format HTML forms and many older REST APIs use. This tool follows RFC 3986 and outputs %20. If a server-side decoder interprets + as a space, a literal + in a parameter value will survive encoding but silently corrupt after decoding on the receiving end.
When to use URL Encoder / Decoder
- Debug an OAuth redirect_uri mismatch by decoding the percent-encoded callback URL your auth server logged back into a readable string.
- Encode a dynamic API path that includes user-supplied email addresses, city names, or product titles before embedding them as query parameter values.
- Verify that a webhook handler is receiving the correct payload by decoding its URL-encoded body before manually parsing the key-value pairs.
Expert Notes
There are two distinct encoding functions developers frequently confuse: `encodeURIComponent` encodes everything except unreserved characters (use for query parameter values), while `encodeURI` preserves structural characters like `/`, `?`, and `#` (use for full URLs). Double-encoding is a common bug — if a URL has already been encoded, encoding it again turns `%20` into `%2520`. When debugging redirect chains or OAuth flows, decode the full URL first before inspecting individual components.
DevLab's Take
Invaluable when hand-constructing OAuth redirect URIs or debugging 400 errors caused by unencoded special characters in query strings — less useful once you're using a URL-building library that handles encoding automatically.
Frequently Asked Questions
What is the difference between encoding a full URL and encoding a URL component?
Why does my URL contain both %20 and + for spaces?
Does double-encoding break the original value, and how do I detect it?
How are Unicode characters like emoji or CJK script handled?
Which characters are never percent-encoded, and why does that matter?
Related Tools
- Base64 Encoder / Decoderencode and decode Base64 strings and files in your browser · Encoding
- HTML Entity Encoderencode and decode HTML entities for safe HTML embedding · Encoding
- Slug Generatorconvert any text to a URL-friendly slug · Text
- Hash Generatorgenerate MD5, SHA-1, SHA-256, and SHA-512 hashes from text · Encoding
Learn more
- Base64 Encoding ExplainedUnderstand what Base64 is, how it works, when to use it, and when not to.
- URL Encoding Explained: What %20 Actually MeansUnderstand percent-encoding, why spaces become %20, when to use encodeURI vs encodeURIComponent, and how to decode URLs correctly.
- UTF-8 Explained: How Computers Store TextUnderstand how UTF-8 encodes every writing system into bytes, why it became the universal standard, and how encoding bugs appear in real applications.