URL encoder / decoder
URLs allow only certain ASCII characters unescaped — spaces, ampersands, and Unicode must become percent-encoded (%20, %26, UTF-8 bytes). Encode strings before building query params; decode messy copied links to read values — essential for web dev debugging.
How to URL encode or decode
1. Select encode or decode.
2. Paste plain text or percent-encoded URL component.
3. Copy result for fetch URL or analytics tag.
4. Use encodeURIComponent for query values, not full URLs blindly.
URL encoding examples
Search query
"coffee & tea" as query becomes coffee%20%26%20tea in ?q= parameter.
Unicode city name
München encodes to M%C3%BCnchen in UTF-8 percent encoding.
Decode redirect param
Read ?next=%2Fdashboard%3Ftab%3D1 to learn redirect target path.
When to URL encode
• When building query strings manually in tests.
• When debugging broken links with special characters.
• When decoding analytics UTM parameters from logs.
RFC 3986 basics
Reserved characters like ? # & have meaning in URLs — encode only data parts. Structure: scheme://host/path?query#fragment.
Frequently asked questions
encodeURI vs encodeURIComponent?
encodeURI keeps :// and ? for full URLs; encodeURIComponent encodes everything for query values — JS distinction applies conceptually.
Plus vs %20?
Query strings often treat + as space in application/x-www-form-urlencoded — know context.
Slashes in params?
encodeURIComponent encodes / to %2F — required inside single param value.
Local?
Yes.
IDN domains?
Unicode domains use punycode in DNS — separate from path encoding.