Image to Base64 Converter
Convert images to Base64 encoded strings, Data URLs, HTML img tags, CSS backgrounds, Markdown and JSON. Also decode Base64 back to images. Supports batch conversion. No server your images never leave your device.
PNG, JPG, GIF, WebP, SVG, BMP, ICO, AVIF up to 10 MB each
Choose ImagesOutput Format Guide
data:image/png;base64,ABC123...iVBORw0KGgoAAAANSUhEUgAA...<img src="data:..." alt="x" />background-image: url('data:...');{"image": "data:image/png;..."}Related Tools
Free tools that work great alongside the Image to Base64 converter.
Free Image to Base64 Converter Online
TOOLBeans Image to Base64 converter transforms any image file PNG, JPG, GIF, WebP, SVG, BMP, ICO or AVIF into a Base64-encoded string entirely in your browser. Your images are never uploaded to any server, making this the safest and fastest option available.
Choose from six output formats: raw Data URL for direct use in HTML or CSS, Base64-only string for API payloads, HTML img tag with optional alt text and class, CSS background-image property, Markdown image syntax for README files, or a JSON object field. Batch convert multiple images at once and download all results.
The built-in Base64 decoder reverses the process paste any Base64 string or Data URL and instantly preview the decoded image with a one-click download button. Useful for debugging API responses, inspecting embedded images from HTML source, or recovering images from JSON payloads.