URL Encoder & Decoder
What Is URL Encoding?
URL encoding (also called percent-encoding) is a mechanism for encoding special characters in a URL. Characters that aren't allowed in URLs (like spaces, ampersands, and non-ASCII characters) are replaced with a % sign followed by their hexadecimal value. For example, a space becomes %20.
How to Use This Tool
Select Encode or Decode mode. Paste your text or encoded URL into the input field. The tool processes it instantly when "Live update" is enabled.
encodeURIComponent vs encodeURI
- encodeURIComponent — Encodes everything except: A-Z a-z 0-9 - _ . ! ~ * ' ( ). Use this for encoding query parameter values.
- encodeURI — Preserves URL structure characters like :, /, ?, #, &. Use this when encoding a complete URL while preserving its structure.
Frequently Asked Questions
When should I URL encode?
URL encode when passing user-generated content as URL parameters, when including special characters in URLs, or when working with API query strings.
What's the difference between %20 and +?
Both represent a space. %20 is used in URLs (percent-encoding), while + is used in form data (application/x-www-form-urlencoded). This tool uses %20 by default.