URL Encoder & Decoder

Encode special characters in URLs and decode percent-encoded strings.

Encoded Output

How to Use This Tool

  1. Select "Encode" to percent-encode special characters in a URL.
  2. Select "Decode" to convert percent-encoded sequences back to readable characters.
  3. Paste or type your URL or text in the input area.
  4. The output updates automatically. Copy it using the "Copy Output" button.

How It Works

URL encoding (also called percent-encoding) replaces characters that are not allowed in URLs with a % sign followed by two hexadecimal digits. For example, a space becomes %20. This tool uses the JavaScript encodeURIComponent() and decodeURIComponent() functions, which handle the complete Unicode character set correctly.

Frequently Asked Questions

When do I need to URL-encode text?

You need URL encoding when passing text as a query parameter, embedding a URL inside another URL, or constructing API request URLs that contain special characters like &, =, spaces, or non-ASCII characters.

What characters are encoded?

encodeURIComponent() encodes everything except letters, digits, and the characters - _ . ! ~ * ' ( ). Safe URL characters like / ? & = # are also encoded.

Is this the same as HTML encoding?

No. URL encoding replaces characters with %XX sequences. HTML encoding replaces special characters with HTML entities like & or <. They serve different purposes.

← Back to all tools