URL Encoder / Decoder
Percent-encode or decode URLs using encodeURI or encodeURIComponent modes. Fully client-side — no account, uploads, or remote storage.
Added Apr 18, 2026
Input
Result
Enter a value for mode to see your result.
How it works
Encodes or decodes URL strings using either encodeURIComponent (for query parameters) or encodeURI (for full URLs). Handles UTF-8 characters correctly.
Step by step
- 01Choose Encode or Decode mode.
- 02Select Component scope for query parameters; Full URI for complete URLs.
- 03encodeURIComponent encodes all characters except letters, digits, and - _ . ! ~ * ' ( ).
- 04encodeURI preserves characters that have special meaning in a URL path.
Examples
Encode query parameter
Spaces become %20, & becomes %26, = becomes %3D.
Inputs
- Mode:
- encode
- Scope:
- component
- Input:
- hello world & foo=bar
Result
- Output:
- hello%20world%20%26%20foo%3Dbar
Decode URL component
%20 → space, %26 → &, %3D → =.
Inputs
- Mode:
- decode
- Scope:
- component
- Input:
- hello%20world%20%26%20foo%3Dbar
Result
- Output:
- hello world & foo=bar
Frequently asked questions
When should I use encodeURIComponent vs encodeURI?
Use encodeURIComponent for individual query parameter values — it encodes &, =, ?, /, and other URL structural characters. Use encodeURI for a full URL where you want to preserve the URL structure but encode spaces and non-ASCII characters.
Why does space become %20 instead of +?
In standard percent-encoding (RFC 3986) spaces are encoded as %20. The + notation is used only in application/x-www-form-urlencoded content type, which is different from URL encoding.