ZeroKit

Loading tool…

How to URL Encode and Decode

URL encoding (percent-encoding) converts special characters into a format safe for URLs. This tool encodes and decodes URL components instantly.

  1. Paste a URL or text string into the input.
  2. Click Encode to percent-encode special characters, or Decode to reverse the process.
  3. Copy the result for use in query parameters, API calls, or redirects.

How Percent-Encoding Works

Reserved URL characters (spaces, &, =, ?, #, etc.) are replaced with a percent sign followed by their two-digit hexadecimal byte value. For example, a space becomes %20, an ampersand becomes %26. This prevents characters from being misinterpreted as URL delimiters. UTF-8 characters are first encoded to bytes, then each byte is percent-encoded.

Why Use Our URL Encoder?

  • Encode and decode — both directions in one tool.
  • Component vs. full URL — choose between encodeURIComponent and encodeURI behavior.
  • UTF-8 aware — international characters are encoded correctly.
  • Client-side — no server, no logging.

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL but preserves characters like :, /, ?, and #. encodeURIComponent encodes everything except letters, digits, and a few symbols — use it for query parameter values.

Why do I need to URL-encode?

Special characters in URLs (like & or =) have reserved meanings. Without encoding, a value containing & would be interpreted as a parameter separator instead of literal text.

Does it handle Unicode?

Yes. Non-ASCII characters are first UTF-8 encoded, then each byte is percent-encoded (e.g., é becomes %C3%A9).

Is my data private?

Yes. All processing happens in your browser.