Convert text, images, and files to Base64 format instantly. Supports URL-safe encoding, Data URI generation, live encoding, and image preview — completely free and private, no server upload.
Everything you need to encode and decode Base64 strings efficiently.
Real-time encoding and decoding as you type. No server requests — everything runs in your browser.
Support for images, PDFs, documents, audio, video and binary files. Browser processing supports large files subject to available memory.
Generate URL-safe Base64 strings that work in URLs and filenames without encoding issues.
Generate Data URIs for embedding images directly in HTML, CSS, or JavaScript.
All processing happens locally in your browser. Your data — including files and images — never leaves your device.
Export as plain Base64, HTML img tag, CSS background-image, or Markdown image syntax.
Include small images directly in HTML without additional HTTP requests for faster page loads.
Embed icons and small graphics in CSS files to reduce the number of image requests.
Encode files for safe transmission through email systems that support MIME text encoding.
Send binary data through JSON APIs and web services that expect string values.
Store small files and images as text in databases that do not support binary fields directly.
Encode credentials and tokens for HTTP Basic Authentication and JWT-style Base64url payloads.
Base64 uses 64 characters to represent binary data. Each character represents 6 bits of data.
| Value | Char | Value | Char | Value | Char | Value | Char |
|---|---|---|---|---|---|---|---|
| 0 | A | 16 | Q | 32 | g | 48 | w |
| 1 | B | 17 | R | 33 | h | 49 | x |
| 2 | C | 18 | S | 34 | i | 50 | y |
| 3 | D | 19 | T | 35 | j | 51 | z |
| 4 | E | 20 | U | 36 | k | 52 | 0 |
| 5 | F | 21 | V | 37 | l | 53 | 1 |
| 6 | G | 22 | W | 38 | m | 54 | 2 |
| 7 | H | 23 | X | 39 | n | 55 | 3 |
| 8 | I | 24 | Y | 40 | o | 56 | 4 |
| 9 | J | 25 | Z | 41 | p | 57 | 5 |
| 10 | K | 26 | a | 42 | q | 58 | 6 |
| 11 | L | 27 | b | 43 | r | 59 | 7 |
| 12 | M | 28 | c | 44 | s | 60 | 8 |
| 13 | N | 29 | d | 45 | t | 61 | 9 |
| 14 | O | 30 | e | 46 | u | 62 | + |
| 15 | P | 31 | f | 47 | v | 63 | / |
Base64 is a binary-to-text encoding scheme that converts binary data into a set of 64 ASCII characters (A–Z, a–z, 0–9, +, /). It was designed to safely transmit binary data through systems that only support text, such as email (MIME), URLs, and XML. The name “Base64” comes from its 64-character alphabet.
| Step | Description |
|---|---|
| 1. Group bytes | Take 3 bytes (24 bits) of input at a time. |
| 2. Split bits | Divide 24 bits into four 6-bit groups. |
| 3. Map chars | Map each 6-bit value (0–63) to a Base64 character. |
| 4. Pad | Add = padding if the input is not divisible by 3. |
| Result | Output is approximately 33% larger than the original binary input. |
| Feature | Standard | URL-Safe |
|---|---|---|
| Character 62 | + | - |
| Character 63 | / | _ |
| Safe in URLs | No — needs encoding | Yes — no encoding needed |
| Safe in filenames | Not universally | Yes |
| Use case | Email, general data | URLs, JWT, filenames |
Formula: Output size = ⌈Input bytes / 3⌉ × 4
Recommendation: Only embed files under about 10 KB as Data URIs — larger files can significantly increase page weight.
Base64 provides zero security. Anyone can decode Base64 instantly. It is an encoding scheme, not protection. If you need confidentiality, use appropriate encryption first, then optionally Base64 encode the encrypted output for transmission.
Common questions about Base64 encoding, decoding, and this tool.
More free tools to supercharge your workflow.