Converts uploaded image files (PNG, JPEG, GIF, WebP, SVG, BMP) to Base64-encoded data URLs. Shows the encoded string, data URI format (for use in HTML src attributes and CSS backgrounds), and the raw Base64 string. Displays file size before and after encoding. Useful for embedding images directly in HTML/CSS without a separate file request.
Click or drag an image here
PNG, JPG, GIF, WebP, SVG supported
Upload or drag-and-drop an image to get its Base64 data URL instantly. To decode a Base64 string back to an image, use the Base64 to Image converter.
PNG to Base64
Input
logo.png (2KB)
Output
data:image/png;base64,iVBORw0KGgo...
Convert Base64-encoded data URLs back to viewable and downloadable images.
Encode text as a Base64 string.
Decode a Base64 string back to plain text.
Convert between bytes, KB, MB, GB, TB and calculate string byte sizes.
Generate linear, radial, and conic CSS gradients with live preview.
Create CSS box shadows with live preview and code output.