Image to Base64 Converter
Convert image to Base64 encoding, or convert Base64 to image
Click or drag the image here
Supports JPG, PNG, GIF, WebP, SVG and other formats
Convert image to Base64 encoding, or convert Base64 to image
Prepare an inline HTML/CSS image or inspect image data from an API. Large images are usually better served as separate, cacheable files.
Choose a small PNG and select data URL output. The result should begin with data:image/png;base64,. Use the complete value in a test image’s src and check the decoded preview.
Base64 typically increases the binary data size by about one third; encoding does not compress the image. Match the media-type prefix to the content. Sharing the encoded string also shares the image.
Data and network notes · More tool guides