URL Encoder & Decoder

Encode text for use in a URL, or decode a percent-encoded URL back to readable text.

Mode

Runs on your device. Nothing you paste is uploaded.

Which encoding do I need?

  • Query value / path segment (encodeURIComponent) — for one piece of a URL, such as a search term or a file name. It also escapes / ? & = # +, so a value like a&b=c can't break the query string. This is the right choice nine times out of ten.
  • Whole URL (encodeURI) — for a complete URL containing spaces or non-ASCII characters. The characters that give a URL its structure are kept.
  • Form data — application/x-www-form-urlencoded, what HTML forms send: like component encoding, but spaces become +.

Everything is encoded as UTF-8, so café becomes caf%C3%A9 and emoji work too.

Decoding

Decoding turns %20 into a space, %C3%A9 into é, and — when you choose Form data — + into a space. If the input contains a broken sequence (like %E9 on its own, which isn't valid UTF-8, or a lone %), you're told where. When you decode a full URL, its query parameters are listed separately, which makes long tracking or redirect URLs much easier to read.

Is my data uploaded?

No. Encoding runs in your browser, so nothing you add is sent to gratistools.be. See the privacy page for details.