Convert any image to a base64 data URL string.
Drop your file here
or click to browse
PNG, JPG, JPEG, WEBP, SVG, GIF · Max 10MB
Convert small icons and logos to data URIs for inline embedding.
Encode images for JSON API requests that expect base64.
Embed images directly in HTML emails without external hosting.
Convert any image to a base64 data URL string in your browser. Drop your image and copy the encoded string to use in HTML, CSS, JSON, or any other context that accepts a data URL.
Base64 encoding is used to embed images directly in code without a separate file. This is common for small icons in CSS, inline images in email templates, and API payloads that transfer image data as text.
The tool shows the full data URL including the MIME type prefix, the length of the string, and the estimated size in kilobytes so you can judge whether inlining the image is practical.
Everything runs in your browser using the FileReader API. No upload, no server, no account required.
FAQ
Compress Image
Reduce image file size without losing quality. Supports PNG, JPG, and WEBP.
HEIC to JPG
Convert iPhone HEIC photos to JPG format instantly in your browser.
Resize Image
Resize images to exact dimensions with presets for Instagram, LinkedIn, YouTube, and more.
JPG to PNG
Convert JPG images to PNG format with transparency support.
5 free uses left today
Go Pro