URL Encoder / Decoder
Percent-encode text for safe use in a URL, or decode it back to plain text.
How to use the URL Encoder / Decoder
- Type or paste text or a URL-encoded string.
- Click Encode or Decode.
- 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.