URL Encoder / Decoder

Encode or decode URL components and query strings. Supports both encodeURIComponent and encodeURI.

Plain URL / Text0 chars
Encoded Output

encodeURIComponent

Encodes almost everything including / ? # @ & = +. Use for encoding individual query parameters or path segments.

encodeURI (Full URI)

Preserves URL structure characters like / : ? # & =. Use when encoding a complete URL while keeping it functional.

How to Encode and Decode URLs Online

  1. 1. Choose Encode to percent-encode a URL, or Decode to decode a percent-encoded URL.
  2. 2. Select Component to encode query parameter values, or Full URI to encode a complete URL.
  3. 3. Paste or type your text — output updates instantly.
  4. 4. Click Swap to flip the result back to the input for chained operations.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent encoding) replaces unsafe ASCII characters with a % followed by two hex digits. For example, a space becomes %20, and & becomes %26. This ensures URLs are valid and unambiguous.

When should I use encodeURIComponent vs encodeURI?

Use encodeURIComponent when encoding individual query parameter values or path segments — it encodes /, ?, #, &, and = which would otherwise break URL structure. Use encodeURI when encoding a full URL while preserving its structure.

What characters get percent-encoded?

All characters except A–Z, a–z, 0–9, and the safe characters - _ . ! ~ * ' ( ) are percent-encoded in component mode. Letters, digits, and those safe characters are passed through unchanged.

What is the difference between %20 and + in URLs?

%20 is the standard percent-encoding of a space, valid in both URL paths and query strings. The + sign represents a space only in the query string portion (application/x-www-form-urlencoded format). In path segments, always use %20.