Image ⇄ Base64 Converter — Encode or Decode
Convert an image to a base64 data URI, or decode a base64 string back into an image — entirely in your browser. Free, client-side, nothing is ever uploaded.
🔒 100% Client-Side Processing
Your data is processed entirely in your browser and never transmitted to any server.
Click or drag an image here
PNG, JPEG, GIF, WebP, SVG — never leaves your browser
Common Use Cases
Inlining small icons in CSS
Embed a tiny sprite or icon directly as background-image: url(data:...) to avoid an extra HTTP request.
Embedding images in HTML emails
Many email clients block external images by default — a data URI displays immediately without that risk.
Prototyping with a placeholder image
Paste a data URI straight into code while testing, without hosting a real file anywhere yet.
Frequently Asked Questions
- Why would I convert an image to base64?
- To embed it directly in CSS, HTML, or JSON without a separate file request — inlining small icons to save an HTTP request, or embedding images in HTML email templates where external images often get blocked by default.
- Does the image ever get uploaded anywhere?
- No — the browser's FileReader API reads the file and encodes it entirely on your device. Nothing is sent to a server, which is also why this works offline once the page has loaded.
- Is there a practical size limit?
- Base64 inflates the original file size by roughly 33%, and very large data URIs become impractical to paste into CSS or HTML. This works well for icons and small images (a few hundred KB); for large photos, host the file separately instead.
- What if my base64 string is missing the "data:image/..." prefix?
- Paste it as-is and the decoder assumes image/png. If your image is actually a JPEG, WebP, or SVG, include the full data URI (starting with data:image/jpeg;base64, etc.) so it decodes with the correct format.
- Is my data private when I use this tool?
- Yes. This tool runs entirely in your browser using client-side JavaScript — nothing you type is transmitted to, logged by, or stored on any server. You can safely process confidential text, tokens, or code.