Image to Base64. Inline images, zero upload.
Batch-convert images into Base64 data URIs with ready-to-paste HTML, CSS and Markdown snippets, or decode Base64 back into a file. Everything runs in your browser; nothing is uploaded.
A free online tool by Digital HeroesInline images, zero upload
Image to Base64 reads your files with the browser's own FileReader and turns them into Base64, with one-click snippets for data URIs, HTML <img> tags, CSS background-image rules and Markdown. Optionally re-encode to PNG, JPG or WebP with a quality slider to keep the payload small, and get a size warning when an output passes 1 MB. The reverse tab decodes any Base64 or data URI back into a downloadable image with automatic type detection. No server, no limits, completely free.
Everything an encoder should do.
- Encode any image to Base64 instantly, drop PNG, JPG, WebP, GIF or SVG files and get a ready data URI in seconds.
- Copy one-click snippets for raw Base64, HTML
<img>tags, CSS background-image rules and Markdown image syntax. - Re-encode on the fly, convert to PNG, JPG or WebP with a quality slider and optional max-width to shrink the output before encoding.
- Batch-convert many images at once and download every result as a single .txt file.
- Decode Base64 back to an image, paste any Base64 string or data URI, preview it, and download the file with an auto-detected type.
- Private by construction, all processing runs in your browser; no files are uploaded and no server is involved.
Four steps, no manual.
- Drag and drop your image onto the drop zone (or click to browse). It never leaves your device.
- Optionally set encoding options, re-encode to PNG, JPG or WebP, set quality, cap the width and add alt text or a CSS selector.
- Copy the snippet you need, data URI, raw Base64, HTML, CSS or Markdown, straight from each result card.
- To go the other way, switch to Base64 → Image, paste a Base64 string or data URI, and download the decoded file.
Frequently asked questions.
Is Image to Base64 free?
Are my files uploaded anywhere?
What is a Base64 data URI, and when should I inline images?
data:image/…;base64,… string, so no separate network request is needed. It's ideal for tiny icons, email templates and single-file demos. Base64 adds roughly 33% to the file size, so for large or reused images a hosted file is usually faster, the tool flags any output over 1 MB.Can I re-encode or resize while converting?
Can it decode Base64 back into an image file?
Does it work offline?
Published · Last updated .