DevToolbox

URL Encoder / Decoder

Percent-encode and decode URLs and query string components.

Processed locally in your browser

Input

Output

What is the URL Encoder / Decoder?

The URL Encoder / Decoder converts text to and from percent-encoding, the mechanism URLs use to carry characters that would otherwise break their syntax. Spaces, ampersands, question marks, non-ASCII characters, and reserved symbols must be encoded as %XX sequences when placed inside query strings or path segments.

URL encoding replaces unsafe characters with percent escapes (a space becomes %20); URL decoding reverses that, turning %20 back into a space. This tool uses the standard encodeURIComponent and decodeURIComponent behavior, so results match exactly what JavaScript produces — and malformed sequences are reported clearly instead of throwing cryptic errors.

How to use the URL Encoder / Decoder

  1. Paste text (to encode) or a percent-encoded string (to decode) into the input.
  2. Click Encode or Decode.
  3. Use Swap to feed the output back into the input.
  4. Copy the result to your clipboard.

Examples

Encode a query value

user@example.com → user%40example.com

Decode

caf%C3%A9%20menu → café menu

Frequently asked questions

What's the difference between encoding and decoding?

Encoding converts special characters into %XX escapes so they can travel safely inside a URL. Decoding reverses the process, restoring the original characters from the escapes.

Should I encode a whole URL or just parts of it?

Encode individual components (query values, path segments) with this tool. Encoding a complete URL would escape the : and / separators that give the URL its structure.

Why does decoding fail with a malformed URI error?

The input contains an incomplete percent sequence, like a lone % or %G1. The tool reports this clearly instead of failing silently.

How are + signs handled?

When decoding, + is treated as a space (the common form-encoding convention). When encoding, spaces become %20, which is safe everywhere.