FREE BROWSER TOOL
Free Image to Base64 Converter
Encode any image to Base64 or Data URI — local, private, one-click copy.
- Data never uploads to a server
- Free, no sign-up, no watermark
- Runs offline after loading
Drop an image here, or click to browse — pasting works too.
JPG · PNG · WebP · SVG — up to 40MB
Drop an image — its Base64 appears here, ready to copy.
How to convert an image to Base64
- Drop the image. Encoding happens instantly — no upload.
- Toggle the data URI prefix. With it, paste straight into CSS, HTML or Markdown; without it, you get raw Base64 for APIs.
- Copy or download. One click copies the whole string, or save it as a .txt file.
When Base64 makes sense
Inline assets
Small icons and logos inline in CSS/HTML save HTTP requests — handy for emails and single-file demos.
API payloads
Many vision APIs accept Base64 in JSON. Use raw Base64 (no prefix) unless the docs ask otherwise.
Size note
Base64 is ~33% larger than the binary — fine for small images, wasteful for photos. Keep files under ~100KB.
Frequently asked questions
How do I convert an image to Base64?
Drop the image and it encodes instantly — the full Base64 string appears on the right. Tick “Data URI” to include the data:image/...;base64, prefix.
Base64 vs Data URI?
A Data URI is Base64 plus a MIME header — usable directly in CSS url() or an img src. Plain Base64 suits APIs and storage fields.
Does encoding increase size?
Yes — Base64 is about 33% larger than the binary file; the page shows both sizes.
Which formats work?
JPG, PNG, WebP, GIF, SVG and AVIF — the MIME type is detected automatically.
Are files uploaded?
No — FileReader reads the bytes locally and encodes them in your browser.