URL Encoder/Decoder
Encode and decode URLs and URL components instantly. Free, private, runs in your browser.
URL Encoder / Decoder
Encode and decode URL components. Supports both encodeURIComponent and encodeURI modes.
Component (encodeURIComponent): Encodes all special characters including / ? # & =
Full URI (encodeURI): Preserves URL structure characters like / ? # &
How to Use URL Encoder/Decoder
- 1
Enter your text or URL
Paste a URL, query parameter value, or encoded string into the input field.
- 2
Choose mode and type
Select Encode or Decode, then pick Component mode for query parameters or Full URI mode for complete URLs.
- 3
Process and copy
Click the action button to process, then use Copy Output to grab the result.
Frequently Asked Questions
Related Tools
URL Encoding: The Rules of the Web's Address System
URLs can only contain a limited set of ASCII characters. RFC 3986 defines "unreserved" characters (A-Z, a-z, 0-9, -, _, ., ~) that can appear anywhere, and "reserved" characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) that have special meaning in URL structure. Any other character — including spaces, Unicode, and reserved characters used as data — must be percent-encoded: the character's UTF-8 bytes expressed as %XX hexadecimal pairs.
encodeURI vs. encodeURIComponent
JavaScript provides two encoding functions with critical differences. encodeURI encodes a complete URL, preserving structural characters like /, ?, and # so the URL remains valid. encodeURIComponent encodes everything except unreserved characters, including / and ? — this is what you want for query parameter values. Using encodeURI on a parameter value that contains & or = will create a malformed URL because those structural characters are preserved instead of encoded.
Double Encoding and How to Avoid It
Double encoding occurs when already-encoded text is encoded again, turning %20 (space) into %2520. This happens when you encode a URL that already contains percent-encoded characters, or when multiple layers of your stack each apply encoding. The telltale sign is %25 appearing in URLs — the percent sign itself being encoded. To avoid it, encode once at the point where user input enters the URL, and ensure middleware and libraries do not re-encode.