Loading tools
Loading tool
6 snippet formats, batch upload, size warnings, browser-only.
A Base64 image converter encodes a binary image file into an ASCII text string that you can embed directly in HTML, CSS, JSON, Markdown, or React. The advantage: no separate HTTP request for the image. The cost: ~33% size inflation, no browser caching. Best for small icons and one-off embeds.
This converter emits 6 snippet formats from one upload -Data URL, CSS background-image, HTML img tag, JSON metadata, Markdown, React JSX. Drop multiple files for batch. Pure browser-only.
Yes. Unlimited use, no signup, no daily cap. Encoding runs entirely in your browser via FileReader + btoa. Base64-image.de works but ships single-format output and ads; we emit 6 snippet formats free.
Six: Data URL only, CSS (background-image rule), HTML (<img src>), JSON metadata, Markdown (), React JSX. Switch tabs to copy the format your context needs.
Yes. Drop a folder of PNG/JPEG/SVG/WebP files, get encoded outputs for each, switch between them via the file list.
No. The FileReader API reads bytes locally; btoa() encodes locally. Your image -including sensitive screenshots, brand assets, or private photos -never leaves the page.
Only small ones. Base64 inflates byte size by ~33%. For images < 5KB (sprites, icons), inlining saves an HTTP request. For larger images, host the file and use a URL -inlining hurts page-load.
Base64 in HTML or CSS bloats the bundle. The browser can't cache it independently from the page. Over 100KB, every page load re-downloads the image. URL-based hosting + CDN is faster after the first visit.
SVG can be inlined as data URL OR as raw SVG with a URL encoded prefix (smaller). This tool emits the Base64 form; for SVG specifically, use the SVG-to-PNG tool or paste SVG inline if you have it as text.
Any format your browser can decode: PNG, JPEG, GIF, WebP, SVG, BMP, AVIF (modern browsers), even ICO. The MIME type is auto-detected and included in the data URL.
Useful for storing image metadata in a config file, sending in a webhook payload, or seeding test fixtures. The JSON includes filename, mimeType, size, and the Base64 string as separate fields.
Standard Base64 uses +, /, and = padding. If you need URL-safe variants (- and _ instead, no padding), use the Base64 Codec tool which has URL-safe output side-by-side.
6 snippet formats, batch upload, browser-only. Free unlimited.
Open the converterThe Image to Base64 Converter page is built, reviewed, and maintained by the Molixa team. We use the tool we ship and update the docs when the behavior changes.