What is Base64?
Base64 turns binary data into plain text using 64 safe characters (A–Z, a–z, 0–9, + and /). A data URI wraps that text with the file type so a browser can display it directly:
data:image/png;base64,iVBORw0KGgo…
This lets you embed an image inside an HTML, CSS, JSON or email file instead of linking to a separate file.
When to embed images
- Small icons and logos, to save a network request.
- HTML emails and single-file documents.
- Sending images through APIs that accept only text.
When not to
Base64 makes data about 33% larger and embedded images cannot be cached separately by the browser. For anything bigger than a few kilobytes, a normal image file is faster.
Private by design
The image is opened and processed by your browser on your own device. It is not uploaded to a server, so the tool also works offline once the page has loaded.
