undelo

URL Encode/Decode

Percent-encode text and URLs, or decode them back

Encodes text into percent-encoded URL format, or decodes percent-encoded text back to plain text, with an explicit Encode/Decode toggle.

How it works

Encoding uses the browser's built-in encodeURIComponent, converting characters like spaces, &, and non-Latin letters into their %XX percent-encoded form so the result is safe to use inside a URL query string or path segment. Decoding reverses that with decodeURIComponent and reports an error rather than guessing at malformed %-sequences.

Frequently asked questions

Why is there a separate Encode/Decode toggle instead of auto-detecting?

Plain text and percent-encoded text can't always be told apart reliably (plain text can legitimately contain a % character), so an explicit toggle avoids a wrong guess.

Why did decoding fail on my input?

The text contains a malformed percent-sequence — a lone %, an incomplete %XX code, or a broken encoded character — which decodeURIComponent can't safely interpret, so it's reported as an error instead of silently producing wrong output.

What gets encoded, exactly?

Everything that isn't a URL-safe character on its own — letters, digits, and a small set of punctuation stay as-is, while spaces, symbols, and non-Latin characters get converted to %XX sequences.

Is this the same as encoding a full URL?

It's built for encoding a single value — like a query parameter or path segment — not a whole URL. Running a complete URL through it would also encode the :// and / characters that need to stay intact for it to remain a valid URL.

Is my text sent anywhere?

No — both directions run entirely in your browser using built-in JavaScript functions. Nothing is uploaded.