JoyToolsJoyTools

URL Encoder / Decoder

100% Client-Side Private — Zero Server Uploads

Encode and decode URL strings with encodeURIComponent, encodeURI, and Base64URL modes.

🔒 100% Client-Side: All data is processed locally in your browser and never leaves your device (Zero Server Uploads).
E-E-A-T Security Proof →
URL Encoder / Decoder
100% Client-Side Private — Zero Server Uploads

Encode and decode URL strings with multiple encoding modes.

Share & Developer Embed

How do I use URL Encoder / Decoder?

1

Choose 'Encode' or 'Decode', select `encodeURIComponent` (Query Param) or `encodeURI` (Full URL), or click 'Sample'.

2

Paste your unencoded string or percent-encoded URL into the left editor.

3

Copy the RFC 3986 percent-encoded or decoded output from the right panel.

What features does URL Encoder / Decoder offer?

URL encode & decode modes

Multiple algorithm options (encodeURIComponent, encodeURI, Base64URL)

1-click copy encoded/decoded string

100% client-side local browser execution

RFC 3986 Percent-Encoding: `encodeURIComponent` vs. `encodeURI`

RFC 3986 divides ASCII characters into Unreserved characters (`A-Z a-z 0-9 - _ . ~`) and Reserved delimiters (`: / ? # [ ] @ ! $ & ' ( ) * + , ; =`).

JavaScript URI Encoding Functions & RFC 3986 Character Handling
Encoding ModeEscapes : / ? & = +Space EncodingCorrect Engineering Use Case
encodeURIComponent()Yes (%3A %2F %3F %26 %3D %2B)%20Encoding individual query parameter keys or values
encodeURI()No (preserves URL structure)%20Encoding a complete URL with Unicode path segments
application/x-www-form-urlencodedYes+ (Plus sign)HTML <form> POST bodies & legacy URLSearchParams

Frequently Asked Questions about URL Encoder / Decoder

What happens if I pass a full `https://...` URL into `encodeURIComponent()`?

`encodeURIComponent()` escapes the protocol colon and slashes (`https%3A%2F%2F`), breaking the URL if used as an `href`. Use `encodeURIComponent()` only on individual query parameter values, or select `encodeURI` for a complete URL.

Why does `decodeURIComponent()` throw `URIError: malformed URI sequence`?

A `URIError` occurs when a string contains a raw `%` sign not followed by two valid hexadecimal digits (for example, `100% organic`), or when a truncated multi-byte UTF-8 percent sequence is encountered. Replace stray `%` signs with `%25` first.

Why are spaces sometimes encoded as `+` and other times as `%20`?

RFC 3986 standard URI encoding encodes spaces as `%20`, whereas the HTML form specification (`application/x-www-form-urlencoded`) encodes spaces as `+`. If a query string contains literal `+` signs (e.g., `+84` phone numbers), encode `+` as `%2B`.

What is double URL encoding (`%2520`) and how do I fix it?

Double encoding happens when an already-encoded string (`%20`) is passed through `encodeURIComponent()` a second time, turning the `%` into `%25` (`%2520`). Run 'Decode' twice to restore the original plaintext.