What Base64 does
Base64 turns binary data — like an image — into plain text using 64 safe characters. Wrapped in a data URI, that text can live directly inside HTML, CSS, JSON or an email, with no separate file to host or request.
The catch is size: Base64 text is about a third larger than the original file. Filemint shows the encoded size so you can decide whether inlining is worth it.
Base64 isn't encryption or compression: anyone can decode it, and it doesn't make files smaller. It's simply a way to carry binary data through systems built for text.
When to inline an image
- Good fits: small icons, simple logos, tiny background patterns and placeholder images.
- Email templates: inline images can display without loading external files, though support varies between email clients.
- Single-file demos: prototypes and HTML files you want to share as one document.
- Poor fits: photos and large images, which bloat your code and can't be cached separately by the browser.
A useful rule of thumb: if the image is only a few kilobytes and appears on most pages, inlining saves a request. If it's large or used once, keep it as a normal file.
In CSS, an inlined image arrives together with the stylesheet, so there's no flash of a missing icon while a separate file loads.
Snippets you can paste
Each snippet is ready to use. The data URI starts with the right type, like data:image/png;base64, so browsers know how to read it. The CSS version wraps it in a background-image rule; the HTML version in an img tag. SVGs are encoded too — handy for icons in stylesheets.
Raw Base64, without the prefix, is what many APIs and JSON fields expect. Copy that version when a system asks for the encoded data on its own.
Remember to give an img tag meaningful alt text before publishing, so the image stays accessible.
Keep strings short
Shrink images before encoding to keep strings manageable: Resize Image to the size you'll display, then Compress Image to trim the bytes. To turn a Base64 string back into a file, use Base64 to Image.
Everything runs in your browser, so nothing you encode is uploaded. It's free, with no sign-up.