URL Encode / Decode
Percent-encode URLs and query parameters, or decode encoded strings back to readable text. Supports both encodeURIComponent and encodeURI. Updates as you type.
Common use cases
Query string parameters
Values in query strings must be percent-encoded — spaces become %20 or +, & must be %26, = must be %3D. Use encodeURIComponent on each individual value before concatenating the URL.
Debugging encoded URLs
URLs in server logs, redirect chains, and API responses are often encoded. Decode them to see the actual path and parameter values without manually parsing %XX sequences.
OAuth and redirect URIs
OAuth redirect_uri parameters must be URL-encoded when included in an authorization URL. Encoding the full redirect URL correctly is a common source of OAuth flow failures.
Fetch and XMLHttpRequest
When building URLs dynamically in JavaScript, always encode user-supplied values with encodeURIComponent. Failing to encode allows injection of & or = characters that break the query string structure.
Common encoded characters
Characters that must be encoded in URL contexts
%20%26%3D%2B%2F%3F%23%40%3A%21%27%22Frequently asked questions
What is URL encoding (percent encoding)?
URL encoding replaces characters that are not allowed or have special meaning in URLs with a percent sign followed by two hex digits representing the character's byte value. A space becomes %20, & becomes %26, = becomes %3D. This allows arbitrary text to be safely embedded in a URL without breaking its structure.
What's the difference between %20 and + for spaces?
Both represent a space, but in different contexts. %20 is the RFC-standard encoding valid everywhere in a URL. The + sign for spaces is only valid in the query string (application/x-www-form-urlencoded format) — it comes from HTML form submission encoding. In a URL path, a + is a literal plus sign, not a space. Use %20 when in doubt.
When should I use encodeURIComponent vs encodeURI?
encodeURIComponent encodes everything except letters, digits, and -_.!~*'(). Use it for individual query parameter values or path segments. encodeURI preserves URL-structural characters like / : ? # & = so use it to encode a complete URL while keeping it functional. Never use encodeURI on a parameter value — it won't encode & or = which would break the query string.
Why does my URL have %2F in it and how do I fix it?
%2F is an encoded forward slash (/). If you encoded a full URL path with encodeURIComponent, every slash got encoded. Switch to encodeURI for full URLs, or encode only the parameter values (not the slashes between path segments). Many web servers treat %2F in a path as a security concern and reject it by default.
Does URL encoding affect SEO?
Google recommends using UTF-8 encoded, human-readable URLs. Properly decoded URLs (slug-style with hyphens) rank better than URL-encoded strings in anchor text. However, Google handles percent-encoded URLs correctly — encoding is a technical necessity, not an SEO penalty. Just ensure your canonical URLs use decoded, human-readable paths.
Related Tools
All conversions run in your browser — nothing is uploaded.
Browse all 26 converters →