GT GetToolsFree
Free · No sign-up · Runs in your browser

URL Encoder / Decoder

Percent-encode text for safe use in a URL, or decode it back to plain text.

Ad space — 728×90 banner
Result

How to use the URL Encoder / Decoder

  1. Type or paste text or a URL-encoded string.
  2. Click Encode or Decode.
  3. Copy the result.

How it works

URL encoding (percent-encoding) replaces characters that aren't safe in a URL with a % followed by their hex code — a space becomes %20, & becomes %26, and so on. This matters whenever a value you're putting into a query string might contain those characters: a search term with an ampersand, for instance, would otherwise break the URL's structure. This tool uses encodeURIComponent, the right choice for encoding a single value (like a query parameter), not a full URL with its own slashes and protocol.

Frequently asked questions

Why does decoding sometimes fail?

A malformed percent-sequence — like a stray % not followed by two valid hex digits — makes decoding fail. The tool shows an error rather than guessing.

Is this the same as Base64 encoding?

No — they solve different problems. URL encoding makes text safe inside a URL; Base64 represents arbitrary data as text-safe characters for contexts like data URLs or JSON payloads. See our Base64 Encoder / Decoder for that.