Convert plain text or binary data to Base64-encoded format, or decode a Base64 string back to its original text.
Base64 encodes binary data into 64 ASCII characters. Every 3 bytes of input produce 4 Base64 characters. If input length is not a multiple of 3, = padding is added.
| Character(s) | Index Value(s) |
|---|---|
| A–Z | 0–25 |
| a–z | 26–51 |
| 0–9 | 52–61 |
| + | 62 |
| / | 63 |
| = | Padding |
| Use Case | Description |
|---|---|
| Email attachments | MIME encoding for binary files |
| Data URLs | Embed images in HTML/CSS |
| JSON / APIs | Transmit binary data in JSON |
| HTTP Basic Auth | user:pass encoded in header |
| JWT tokens | Header and payload encoding |