Image to Base64
Turn an image into a Base64 string or data URI with ready-to-paste HTML and CSS, or decode a Base64 string back into an image file.
How to convert an image to Base64
- Drop an image into the box. It is encoded instantly.
- Copy the data URI, the raw Base64, an HTML
<img>tag or a CSS snippet with one click. - To go the other way, open Base64 → Image, paste the string and download the file.
Features
Ready snippets
Data URI, HTML and CSS, copied in one click.
Two-way
Encode images and decode Base64 back to files.
Instant
No upload wait — results appear immediately.
Private
Your image never leaves your device.
Frequently asked questions
What is a Base64 image?
Base64 turns the binary bytes of an image into plain text. Prefixed with data:image/png;base64, it becomes a data URI that can be embedded directly in HTML, CSS, JSON or Markdown without a separate file.
When should I embed images as Base64?
For small icons and logos, email templates, single-file HTML documents and quick prototypes. Avoid it for large photos: Base64 is about 33% bigger than the original file and cannot be cached separately.
Can I convert Base64 back to an image?
Yes. Switch to the Base64 → Image tab, paste the string (with or without the data URI prefix) and download the decoded PNG, JPG, WebP, GIF or SVG.
Is the image uploaded?
No. Encoding and decoding happen in your browser with the FileReader API. Nothing is sent anywhere.