URL Encode / Decode

Percent-encode text for safe use in URLs, or decode it back to readable text.

Output

What is URL encoding?

URLs may only contain a limited set of characters, so anything else β€” spaces, ampersands, slashes, accented letters β€” must be percent-encoded. A space becomes %20, an ampersand becomes %26, and so on. This keeps query strings and paths unambiguous as they travel between browser and server.

Which function this uses

Encoding uses encodeURIComponent, which escapes every reserved character and is the right choice for a single query-string value or path segment. Decoding uses decodeURIComponent, and any malformed % sequence is reported instead of silently mangling your text.

How to use the URL Encode / Decode

  1. Choose a mode. Pick Encode to escape text, or Decode to reverse it.
  2. Enter your input. Paste the raw text or the encoded string.
  3. Click Convert. The output also updates live as you edit.
  4. Copy the result. Use the Copy button to reuse the output.

Frequently asked questions

What is the difference from Base64?

Percent-encoding only escapes URL-unsafe characters and stays mostly human-readable, while Base64 re-encodes everything into a compact ASCII blob.

Encode component or whole URL?

This tool uses encodeURIComponent, which is intended for a single value or segment. It escapes characters like & and / that a full URL relies on.

Why did decoding throw an error?

A stray percent sign or an incomplete escape such as %2 is not valid percent-encoding, so it is reported rather than guessed.

Is anything sent to a server?

No. The conversion runs entirely in your browser.