Converters
Base64 Image Converter
Encode any image to a Base64 data URL for embedding in HTML or CSS, or decode a Base64 string back to a downloadable image. Instant, browser-side, all image formats supported.
Upload Image to Encode
Drop image here or click to browse
JPG, PNG, WebP, SVG, GIF
Base64 Output
Base64 output appears here
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into a string using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). For images, Base64 encoding lets you embed image data directly inside HTML, CSS, JSON, or XML as a data URL — no separate file or HTTP request required.
How to use a Base64 image in HTML and CSS
- HTML img:
<img src="data:image/png;base64,iVBORw..." /> - CSS background:
background-image: url('data:image/png;base64,iVBORw...') - JSON payload: Include the raw Base64 string (without data: prefix) when the API accepts base64-encoded image data.
- SVG in CSS: SVGs can be URL-encoded instead of Base64 for slightly smaller size.
Base64 size trade-off
Base64 encoding increases file size by approximately 33%. A 100 KB PNG becomes ~133 KB as Base64. This is acceptable for small images (icons, logos under 10 KB) but significantly degrades performance for larger images. For production websites, always serve large images as regular files from a CDN and reserve Base64 for tiny inline assets.
Related tools
- JPG to PNGConvert JPEG images to PNG format with transparency support. Lossless output, processed entirely in your browser.
- PNG to JPGConvert PNG images to JPEG format with adjustable quality. Reduces file size for web use — all in your browser.
- HEIC to JPGConvert iPhone HEIC/HEIF photos to JPEG format. Works offline in your browser — your photos never leave your device.
- WebP to JPGConvert WebP images to JPG format for maximum compatibility. Drag, drop, and download — no upload needed.
- WebP to PNGConvert WebP images to lossless PNG format with full transparency support. No upload — runs entirely in your browser.
- JPG to WebPConvert JPG images to WebP format for smaller file sizes and faster web performance. Quality control included, browser-side.