URL Encoder / Decoder

Percent-encode or decode URLs and query values — component or full-URL mode, batch lines, copy.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A fast, no-nonsense URL encoder and decoder for developers. Paste any text, URL, or list of values and convert it to or from percent-encoding instantly. Choose between component mode (encodeURIComponent, which escapes almost everything) and full-URL mode (encodeURI, which keeps the URL structure intact), switch between encoding and decoding with one dropdown, and process dozens of lines at once in batch mode. Every result has a one-click copy button, and a Swap action round-trips the output back into the input so you can verify a conversion both ways.

How it works

Percent-encoding replaces unsafe or reserved characters with a % followed by two hexadecimal digits — a space becomes %20, an ampersand becomes %26, and so on. This is how URLs carry spaces, unicode, and special characters without breaking. The tool uses the browser’s own four standard functions, so the output matches exactly what your JavaScript runtime, server, and HTTP client will produce.

The key decision is which characters to escape. Component mode calls encodeURIComponent, escaping every reserved character including : / ? & # =. That is what you want for a single query-string value or path segment, because those characters would otherwise be interpreted as URL structure. Full-URL mode calls encodeURI, which leaves the structural characters alone so a complete link such as https://site.com/a b?x=1 stays a valid, working URL with only the space encoded. Decoding reverses the process with decodeURIComponent and decodeURI; a malformed escape (a lone %, or %zz) raises a URIError, and the tool flags that line rather than silently corrupting your data.

Example

Type the value hello world & café into the input with Encode and Component selected. The output is hello%20world%20%26%20caf%C3%A9 — the space, ampersand, and accented é are all escaped, so the string is safe to drop straight into a query parameter. Switch the scheme to Full URL on the link https://gera.tools/a b?q=1&r=2 and only the space changes, to https://gera.tools/a%20b?q=1&r=2, leaving the ?, &, and = untouched so the URL still parses.

Flip the direction to Decode, paste caf%C3%A9%20au%20lait, and you get back café au lait. Turn on batch mode, drop several encoded strings one per line, and each is decoded independently with a per-line breakdown table showing input next to output. Everything is computed in your browser — nothing you paste ever leaves your device.

Ad placeholder (rectangle)