Base64 Encode / Decode
Encode text to Base64 or decode Base64 strings with URL-safe mode support.
Input
Output
Click "Encode" or "Decode" to see the result.
About Base64 Encoding
Base64 is a binary-to-text encoding scheme that represents binary data as an ASCII string. It's commonly used to embed data in URLs, JSON, HTML, and CSS.
URL-safe Base64 replaces + with - and / with _, and removes trailing = padding — making it safe for use in URLs and filenames.
| Use Case | When to Use |
|---|---|
| Data URLs | Embedding small images or fonts in CSS/HTML |
| JWT tokens | Base64URL encoding for header and payload |
| Email attachments | MIME encoding for binary files |
| API payloads | Sending binary data in JSON requests |