Convert images to Base64 strings or Data URIs — one-click copy for HTML, CSS, or JSON
Drop an image here or click to upload
PNG, JPG, WebP, GIF, SVG, BMP, ICO
Converting images to Base64 is useful for embedding small images directly into HTML, CSS, or JSON files. Here's how to use this tool:
Step 1: Upload your image. Drag and drop any image into the upload area, or click to browse. All common formats are supported — PNG, JPG, WebP, GIF, SVG, BMP, ICO, and AVIF.
Step 2: Review the results. The tool displays the image dimensions, original file size, Base64 encoded size, total character count, and the MIME type. A visual size comparison shows the ~33% size increase from Base64 encoding.
Step 3: Choose your output format. Switch between tabs to get the format you need: Data URI for direct use in HTML/CSS, Base64 Only for the raw encoded string, CSS Background for a ready-to-use CSS property, or HTML img Tag for a complete image element.
Step 4: Copy or download. Click "Copy" to copy the output to your clipboard, or "Download .txt" to save it as a text file.
Example: For a small 16×16 favicon (1.2KB PNG), the Base64 output is about 1.6KB — perfect for embedding in an HTML <link> tag to avoid an extra HTTP request.