Turn an image into a Base64 data URI
A data URI embeds an image directly inside your HTML or CSS as text, so it loads with the page instead of as a separate request. That can speed up small icons and remove a dependency on an external file. This tool reads an image in your browser and outputs its Base64 data URI, ready to paste into a src or background-image.
How to use it
- Drop in an image file.
- Copy the generated data URI.
- Paste it into your HTML
imgtag or CSS.
When it is worth it
- Tiny icons and logos where a separate request isn't worth it.
- Self-contained emails or single-file pages.
- Inlining an image so it can't fail to load from a server.
Questions people ask
Should I inline large images? No — Base64 adds about a third to the size and can't be cached separately, so reserve it for small assets.
Is my image uploaded? No — it's read and encoded locally in your browser.