Ad · 728x90

URL Encoder & Decoder

Encode or decode URLs and query strings. Convert special characters to percent-encoding and back. Supports full URL and component encoding.

URL Encoder / Decoder

Ad · 336x280

URL Encoding: Percent-Encoding Explained

URLs can only contain a limited set of safe characters. Special characters (spaces, #, &, =, +, non-ASCII letters) must be percent-encoded as %XX where XX is the hexadecimal ASCII code. A space becomes %20, & becomes %26, and non-ASCII characters like ü become %C3%BC.

encodeURIComponent vs encodeURI

  • encodeURIComponent: Encodes everything except: A–Z a–z 0–9 - _ . ! ~ * ' ( ). Use for individual query parameter values — it encodes / : @ & = + $ , # which must be escaped inside values
  • encodeURI: Leaves the URL structure intact — preserves / : @ & = + $ , # ? and only encodes spaces and non-ASCII. Use for full URL encoding.

Common Percent-Encoded Characters

  • Space → %20 (or + in form data)
  • & → %26
  • = → %3D
  • # → %23
  • + → %2B
  • / → %2F
  • ? → %3F

Frequently Asked Questions