Image to Base64 Converter — Encode & Decode Online
Encode images to Base64 or decode Base64 to images — get data URI, raw string, or HTML tag. No server upload.
How to Use
- Choose Encode or Decode — Select the Encode tab to convert an image to Base64, or the Decode tab to preview a Base64 string as an image.
- Upload image or paste Base64 — In Encode mode, upload any image file. In Decode mode, paste a Base64 or data URI string.
- Copy or preview the result — Copy the Base64 string, data URI, or HTML tag to your clipboard. In Decode mode, see the rendered image preview.
Why Use This Tool
Embedding small images as Base64 data URIs eliminates HTTP requests, which can improve initial page load — especially for icons, logos, and tiny UI sprites. But most online Base64 tools upload your image to their server for encoding, which is unnecessary and insecure.
This tool encodes images entirely in your browser using the FileReader API. Upload any image format — JPG, PNG, WebP, GIF, SVG — and get the Base64 string instantly. Copy the raw string, the full data URI, or a ready-to-paste HTML img tag. The Decode tab does the reverse: paste a Base64 string and see what image it represents.
For images over 100KB, the tool warns you that Base64 embedding will likely hurt performance. In those cases, use a regular file URL with proper caching instead.
Frequently Asked Questions
Related Tools
Convert JPG images to PNG format instantly. Batch up to 5 images. No server upload, 100% private.
Convert PNG to JPG with adjustable quality. See file size before and after. No server upload.
Compress any image with live quality slider. JPG, PNG, WebP supported. No server upload.
Count words, characters, sentences, paragraphs, and reading time instantly.