URL Encoder/Decoder

URL Encoder & Decoder

Percent-encode or decode URLs and query strings — instantly, right in your browser.

Component mode escapes every reserved character (use for query values and path segments); Full URL mode leaves URL structure characters like : / ? & = intact (use for whole URLs).

0 / 500,000 characters
0 characters
Share

About URL Encoder/Decoder

URL encoding (percent-encoding) converts characters that aren't allowed in a URL — spaces, symbols, and non-ASCII characters — into a %XX sequence so they can travel safely inside links, query strings, and form submissions. This tool encodes and decodes URLs entirely in your browser, so nothing you type is ever sent anywhere.

Features:

  • Component mode for query values, path segments, and form data
  • Full URL mode that preserves : / ? & = and other URL structure
  • Instant, live conversion as you type
  • Clear errors for invalid percent-encoded input

How to Use URL Encoder/Decoder

  1. Choose Encode or Decode
  2. Pick Component or Full URL mode
  3. Type or paste your text or URL into the input area
  4. Copy the result with one click

Frequently Asked Questions

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters that aren't safe in a URL — like spaces, &, and non-ASCII letters — with a % followed by two hexadecimal digits representing the character's byte value.

What's the difference between encodeURIComponent and encodeURI?

encodeURIComponent (Component mode) escapes nearly every special character, including / , : and &, so it's safe for a single query value or path segment. encodeURI (Full URL mode) leaves those structural characters untouched because it expects a complete, valid URL.

Why do I get an error when decoding?

Decoding fails when the input contains a % that isn't followed by two valid hexadecimal digits, or a broken multi-byte UTF-8 sequence. Double-check the encoded string was copied in full and hasn't been altered.

When do I use encodeURIComponent vs encodeURI?

Use encodeURIComponent (Component mode) whenever you're encoding a single piece of data — a query parameter, a path segment, or a form field — because it escapes characters like & and = that would otherwise break the URL's structure. Use encodeURI (Full URL mode) only when you already have a complete URL and want to escape spaces or unicode characters while keeping things like :// and ? intact.

Does this work with non-English characters?

Yes. Any Unicode character, including accented letters, Chinese, Japanese, or emoji, is converted to its UTF-8 byte sequence and then percent-encoded, so the result is always plain ASCII-safe text.

Why do spaces become %20 or +?

In a URL path or query value, encodeURIComponent turns a space into %20, its correct percent-encoded form. Some older systems and HTML form submissions instead use + for spaces in the query string — a separate, form-specific convention this tool does not apply, since %20 is the universally correct encoding.

Privacy

Everything happens locally in your browser using built-in Web APIs. Your text is never uploaded to any server.

Standards & References

Last updated: 2026-07-23