Free URL Encoder

Percent-encode URLs or query string parameters. Choose between encoding the full URL (preserving scheme/host/path) or encoding each component individually.

🔒 100% Private ⚡ Instant 🆓 Free
Advertisement

About URL Encoding

URL encoding (percent-encoding) converts special characters into a format safe for use in URLs. Each unsafe character is replaced by a % sign followed by its two-digit hexadecimal ASCII value. For example, a space becomes %20, and & becomes %26.

Encode component uses encodeURIComponent() — ideal for encoding query string values before appending to a URL. It encodes everything except A–Z, a–z, 0–9, -, _, ., ~.

Encode full URI uses encodeURI() — encodes a complete URL while preserving the scheme, host, path separators and query delimiters.

Frequently Asked Questions

Use encodeURIComponent (Encode component) for individual query parameter values, user input, and any string that will be part of a URL. Use encodeURI (Encode full URI) only when you have a complete URL that you want to make safe without breaking its structure.

encodeURIComponent encodes all characters except: A–Z a–z 0–9 - _ . ! ~ * ' ( ). encodeURI additionally preserves: ; , / ? : @ & = + $ # and the full set of alphanumerics.

Both %20 and + represent a space in query strings, but they come from different conventions. %20 is the strict RFC 3986 percent-encoding. + encoding of spaces is a form-encoding convention (application/x-www-form-urlencoded) used by HTML forms. Most server-side frameworks decode both correctly.

Related Developer Tools