The Image to Base64 tool turns a picture into text you can paste straight into code: a raw Base64 string, a full data URI, or a CSS background-image and an HTML img tag with the encoding already inside them. Base64 has no way to shrink the picture, only to re-spell every three bytes as four printable characters, so the output is always about a third larger than the file you dropped in — a real cost worth seeing before you commit an image this way to a stylesheet. The other direction works too: paste a Base64 string or a data URI back in, and it renders as an actual image, with its real format identified from the bytes themselves when nothing declared it, ready to download as a file again.
The guide behind this tool
Base64 Images: The 33% Overhead Explained, and When It's Worth It
A base64 image is a third larger than the file, never cached on its own, and often silently dropped by the email client you were embedding it for.
Drop an image onto the box, or click it to pick one.
Read the size line: original bytes versus the Base64 that came out, and by how much it grew.
Copy whichever form you need — plain Base64, a data URI, a CSS rule, or an HTML tag — each with its own button.
Switch to Base64 → Image to go the other way: paste a string or a data URI.
Check the preview and the detected format, then download it as a file if that is what you needed.
Because Base64 was built to carry binary data through text-only channels, not to compress anything. It reads three bytes at a time and writes four ASCII characters for them, so the output is always 4/3 the input before padding, which works out to about 33% larger. There is no setting that avoids this: it is what encoding binary data as text costs.
32+ Free Tools
Explore all categories
From text processing to developer utilities, all free, all instant, no sign-up.