URL Encoder/Decoder
Input
Encoded
Decoded
About the URL Encoder
Encode and decode URLs and query parameters online for free. Fix broken links, prepare query strings, and inspect encoded values - fast and private, with every conversion computed locally in your browser.
URLs can only contain a limited set of characters, so spaces, ampersands, emojis, and non-Latin text must be percent-encoded before going into a query string — and decoded when read back on the other side. Encoding bugs cause broken links, truncated parameters, and injection vulnerabilities.
Encode or decode URLs and query parameters instantly. Supports both full-URI encoding and the form-encoding used for query string values, where spaces become plus signs.
Use cases and examples
Encode a redirect URL that must travel inside another query parameter - nested parameters break unless the inner value is fully encoded.
Decode a URL from analytics or logs to see the actual parameters users hit.
Prepare values containing spaces, ampersands, or unicode for safe use in links and API calls.
How to use
- Paste the URL or parameter value to encode or decode.
- Pick the encoding mode: full URI or query-string component.
- The converted result appears instantly.
- Copy the safe URL back into your code, link, or request.
Frequently Asked Questions
What is the difference between encodeURI and encodeURIComponent? ▾
encodeURI keeps URL structure characters like :, /, ? and & intact, for encoding a full URL. encodeURIComponent escapes those too, which is what you need for individual query parameter values.
Why do spaces sometimes become %20 and sometimes +? ▾
%20 is standard percent-encoding used in paths and by encodeURI. The plus form comes from the older application/x-www-form-urlencoded format used in HTML form submissions and query strings. Both decode back to a space.
When should I use encodeURIComponent vs encodeURI? ▾
encodeURIComponent encodes everything meaningful in a query-string value (including & = ?); encodeURI preserves URL structure characters. This tool lets you encode full URLs or components accordingly.
Why do spaces become %20 or +? ▾
%20 is the percent-encoded space; + is the legacy application/x-www-form-urlencoded form used in query strings. Both decode to a space, but %20 is universally safe.
Is URL encoding enough to prevent injection? ▾
Encoding makes values safe as URL data, but injection defense is contextual — always URL-encode when building URLs and follow each consumer's escaping rules for HTML or SQL contexts.