Developer Tools

URL Encoder & Decoder

Percent-encode or decode URLs and query parameters. Choose component or full-URL mode.

Input
Output

When to use which mode

Use component mode when encoding a single value to embed in a URL — like a query parameter or a path segment. It encodes everything that could change URL meaning. Use full URL mode when encoding an entire URL — it preserves structural characters like ? and / so the URL still works.

Frequently Asked Questions

What is URL encoding?
URL encoding (percent-encoding) replaces unsafe characters in a URL with %xx hex codes. Required for special characters in query strings and path segments — e.g. spaces become %20, @ becomes %40, ? becomes %3F.
When do I need to encode a URL?
Whenever you embed user input in a URL: query parameters, path segments, fragments, or anywhere a special character could be misinterpreted as URL syntax. Failing to encode is a common source of broken links and security bugs.
What's the difference between encodeURI and encodeURIComponent?
encodeURI keeps URL structure characters (?, /, #, &) unescaped — use it for entire URLs. encodeURIComponent escapes everything not in the unreserved set — use it for individual query parameter values or path segments.
Are + and %20 the same?
Both encode a space, but in different contexts. %20 is universally safe. + means space only in application/x-www-form-urlencoded (HTML form submissions and query strings). In path segments, + means literal +. Always use %20 to be safe.
Is decoding always reversible?
Yes — encoding is fully lossless. If decoding fails, the input contains an invalid percent-sequence (% not followed by two hex digits). Our tool surfaces those errors instead of silently losing characters.

Related Calculators