Encode and decode Base64 strings. Convert text for data URIs, APIs, and safe data transmission.
Base64 is a binary-to-text encoding scheme that converts binary data into a set of 64 printable ASCII characters. It is commonly used to embed images in HTML or transmit data over text-based protocols.
0 characters
A-Z(26 characters)a-z(26 characters)0-9(10 characters)+ /(2 characters)=(end of string)Encoding: Converts each character to its UTF-8 byte representation, then groups bytes into 6-bit chunks mapped to Base64 characters.
Decoding: Reverses the process by converting Base64 characters back to 6-bit values, reassembling bytes into the original text.
100% Client-Side: All processing happens in your browser. Your data never leaves your device.
| Characters | Range |
|---|---|
| A–Z | Characters 0–25 |
| a–z | Characters 26–51 |
| 0–9 | Characters 52–61 |
| + | Character 62 |
| / | Character 63 |
| = | Padding character |
Formula
output_size = ⌈input_bytes / 3⌉ × 4 charactersinput_bytes = Number of bytes in the original binary data
⌈ ⌉ = Ceiling function — rounds up to nearest whole number
× 4 = Every 3 bytes map to 4 Base64 characters (33% overhead)
Worked Example
Encoding "Hi!" (3 bytes)
Did you know? Base64 was standardized in 1987 by RFC 989 for use in Privacy-Enhanced Mail (PEM). Today it is used everywhere from embedding images in CSS data URIs to encoding JWT payloads and HTTP Basic Auth credentials.
Sources
Convert text to ASCII codes and back. Supports decimal, hex, binary, and octal formats.
Convert width/height to aspect ratios, scale dimensions, and generate responsive embed CSS for any layout.
Calculate required internet bandwidth based on devices and activities in your household.
Create CSS border-radius with visual controls for each corner. Generate circles, pills, and custom shapes.
Create CSS box shadows with multiple layers, live preview, and copy-ready code.
Preview how colors appear with different types of color blindness. Test accessibility for color vision deficiency.