>Fafa Dev Tools

URL Encoder/Decoder

Encode or decode URL components instantly. Free online URL encoder and decoder for special characters.

0 chars
Output will appear here...

What is URL Encoder/Decoder?

URL encoding (also called percent encoding) converts special characters in a URL to a %XX format. For example, a space becomes %20, and & becomes %26. This is necessary because URLs can only contain ASCII characters. URL encoding ensures that query parameters, paths, and fragments with special characters are transmitted correctly.

How to Use

  1. Select Encode or Decode mode
  2. Paste the URL or text in the input area
  3. The result appears instantly in the output area
  4. Use Swap to reverse the direction and work back and forth

Examples

Encode URL with query params

Inputhttps://example.com/search?q=hello world&type=test
Outputhttps%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26type%3Dtest

Decode percent-encoded URL

Inputq%3Dhello%20world%26lang%3Den
Outputq=hello world&lang=en

Frequently Asked Questions

What's the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL but keeps reserved characters (: / ? & = #) intact. encodeURIComponent encodes everything, including reserved characters. Use encodeURIComponent for individual query parameter values.

Why does a space become %20 or +?

%20 is the standard URL encoding for a space. The + format comes from application/x-www-form-urlencoded (used in HTML form submissions). Both work, but %20 is more universally correct in URLs.

Should I encode the entire URL or just the parameters?

Encode only the parameter values, not the entire URL. Encoding the protocol (https://) or domain would break the URL. For example, encode the value of ?q= but not the ?q= itself.