Image to Base64
Encode an image as a Base64 data URI so it can be embedded directly in HTML, CSS or JSON with no separate file request. Everything runs in your browser — the image is never uploaded.
Nothing is uploaded — this tool runs inside your browser, so your files never leave your device.
Help us improve
Why use this tool
- Runs fully client-side — your image never leaves your device
- Copy as a raw string, an <img> tag, or a CSS background-image rule
- Shows the encoded size so you can judge whether inlining is worth it
- Works with JPG, PNG, WebP, GIF and SVG
How it works
- 1Drop an image into the box above.
- 2The Base64 string is generated instantly in your browser.
- 3Copy the raw string, the HTML tag, or the CSS rule.
Image to Base64 — frequently asked questions
It embeds an image directly inside HTML or CSS instead of linking to a separate file. That removes one network request, which is useful for tiny icons, email templates, and single-file documents.
More convert tools
Looking for something else? Browse all image tools
Explore the other tools
Same deal everywhere on the site — free, no sign-up, and no watermark on anything you download.
QR Code ToolsBarcode ToolsPDF ToolsDeveloper ToolsSEO ToolsText ToolsCalculatorsUnit ConvertersColor ToolsFile ToolsBusiness ToolsAI ToolsUtilities
Or see every tool on one page.