Skip to content
Developer

URL Encoder / Decoder

Last updated: July 11, 2026

Encode special characters in URLs for safe transmission or decode percent-encoded URLs back to readable text. Essential for building query strings and fixing broken URLs.

How to Use This Calculator

  1. Paste a URL or any text into the input field.
  2. Click "Encode" to convert special characters to percent-encoded format (e.g., space becomes %20).
  3. Click "Decode" to reverse the process and restore the original text.
  4. Use this for constructing query parameters or fixing broken URLs.

Formula

character → %XX  where XX is the hexadecimal byte value

Reserved characters (? & = + # / %) and unsafe characters (space, <, >, {, }, etc.) are encoded. Letters, digits, and - _ . ~ are left unchanged per RFC 3986.

Examples

Example 1: Space Character

“hello world” → hello%20world (space encoded as %20)

Example 2: Special Characters

“price = $50” → price%20%3D%20%2450 (= becomes %3D, $ becomes %24)

Example 3: Query String

search?q=cafe%20latte&lang=en — The space in “cafe latte” is encoded as %20 for safe URL transmission.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) converts characters into a format that can be transmitted safely over the internet. It replaces reserved or unsafe characters with their %XX equivalents.

When do I need to encode a URL?

When constructing query strings with special characters (spaces, &, =, non-ASCII characters, etc.) or when you need to safely include user input in a URL.

What is the difference between encoding a full URL and just the query string?

A full URL has structure (scheme://host/path?query). Typically you only encode the values in the query string, not the URL structure itself (e.g., don’t encode the ? or & delimiters).

Is URL encoding the same as Base64?

No. URL encoding uses %XX notation for individual characters. Base64 encodes entire blocks of data into ASCII letters. They serve different purposes and have different use cases.

Disclaimer: All encoding and decoding is performed locally in your browser. This tool follows RFC 3986 percent-encoding standards.