URL Encoder & Decoder

Encode, decode, and parse URLs with percent encoding. Parse and build query strings instantly.

Encodes all special characters (recommended for query values)

How Percent-Encoding Works

Why encode at all?

URLs permit only a limited character set (RFC 3986). Spaces, non-ASCII characters, `&`, `?` and the like must become `%` + hex bytes: space β†’ `%20`, 'Γ©' β†’ `%C3%A9` (UTF-8).

encodeURI vs. encodeURIComponent

  • `encodeURIComponent`: encodes `&`, `=`, `/` too β€” use for query parameter values
  • `encodeURI`: preserves URL structure characters β€” use for whole URLs

Using `encodeURI` on a parameter value is a classic bug: an `&` inside the value gets read as a parameter separator. Conversely, `encodeURIComponent` on a full URL mangles it into `https%3A%2F%2F...`.

+ vs. %20

In query strings, spaces are historically also written as `+` (form encoding). When decoding, check whether `+` should become a space in your context.

Frequently Asked Questions

Related Tools

Sources & References

Content last reviewed: 2026-08-22