URL Encoder / Decoder
Encode and decode URLs instantly
Want to learn more? Read our guide: Essential Online Productivity Tools
Why Use This Tool?
- Encode or decode URLs instantly -- essential for debugging query parameters and API requests.
- Handles all special characters including Unicode, spaces, and reserved URL characters.
- Browser-based processing means your data never leaves your device.
How It Works
Percent-encoding replaces each unsafe character with a % sign followed by its two-digit hexadecimal value. For example, a space becomes %20, and the & character becomes %26. Multi-byte UTF-8 characters produce multiple %XX sequences.
How to Use
- Paste your text or URL into the input area
- Click Encode to percent-encode or Decode to convert back to readable text
- Copy the result to your clipboard
FAQ
What is URL encoding?
URL encoding (percent-encoding) replaces special characters with a % sign followed by their hexadecimal value. For example, a space becomes %20 and & becomes %26.
When do I need to encode a URL?
URL encoding is needed when passing special characters in query parameters, form data, or API requests. Characters like spaces, &, =, and non-ASCII characters must be encoded to be valid in URLs.
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 special characters. This tool uses encodeURIComponent.
Why are spaces encoded as %20 instead of +?
The %20 encoding follows the URI standard (RFC 3986). The + encoding for spaces is only used in HTML form submissions (application/x-www-form-urlencoded). Both represent a space.
When should I use URL encoding?
Use URL encoding when passing special characters in URLs, query parameters, or form data. Characters like spaces, &, =, ?, /, and non-ASCII characters must be encoded to be safely transmitted in URLs.