Support

Image and Base64

Runs in your browser· your image is converted in this tab and never uploaded

or drop one here. PNG, JPG, GIF, WebP, SVG, ICO or BMP, up to 10 MB.

Convert images to Base64 and back, in your browser

Embed a small image directly in HTML, CSS or Markdown by turning it into a Base64 data URI, or recover the image from a Base64 string you found in code, an API response or an email. The image type is detected from the data itself, you get the exact size cost, and nothing leaves your device.

Frequently Asked Questions

How do I convert an image to Base64?
Choose or drop an image (PNG, JPG, GIF, WebP, SVG, ICO or BMP, up to 10 MB). The page shows the Base64 text, the full data URI, a ready-made HTML img tag, a CSS background-image rule and Markdown, each with a Copy button.
How do I convert Base64 back to an image?
Switch to "Base64 to image" and paste the Base64 text, a data: URI, a CSS url(...) or an img tag. The page detects the image type from the bytes themselves, shows a preview and lets you download the file. If the text is not an image, it says so.
Is my image uploaded anywhere?
No. The file is read and converted by your browser in this tab. Nothing is sent to a server, and nothing is stored.
Why is the Base64 bigger than my image?
Base64 writes every 3 bytes as 4 text characters, so the result is about 33% larger than the file. The page shows the exact numbers. Inline images are fine for small icons; for anything over about 100 KB a normal image file loads faster and can be cached.

Found this useful? Hexabench is free and ad-free. If it saved you time, you can support it.

Buy me a coffee →