Base64 Image Encoder: Encode Images as Data URLs
Convert a local image file into a Base64 data URL for HTML img and CSS url(), or paste a data URL / raw Base64 string to preview and download. Encoding stays in this browser tab.
Image file
Drop a PNG, JPEG, GIF, WebP, or other browser-renderable image here (max 4 MiB). Non-image files are refused.
Accepts a full data:image/…;base64, URL or raw Base64 whose bytes sniff as an image.
Preview
No image yet.
MIME type
—
Byte size
—
Base64 length
—
Data URL length
—
Data URL
Uses RFC 4648 Base64 inside an RFC 2397 / WHATWG data URL. Preview assigns img.src only for image MIME types; nothing is evaluated or stored.
Choose an image or paste a data URL to begin.