Image to Base64

Convert images to Base64 encoded strings

Share this tool

Report a problem

Describe the problem without including private input or files.

How useful was this tool?

How useful was this tool?

Input image

Select or drag an image

Image files up to 10 MiB. JPG, PNG, GIF, WebP, SVG and other image formats.

File information

Name
—
Size
0 B
MIME type
—
Dimensions
—
About Base64 encoding
  • Embed images directly in HTML, CSS, or JSON without external files
  • Useful for email templates, data URIs, and API responses
  • Base64 encoding increases file size by approximately 33%
  • Best for small images like icons, logos, or thumbnails

Base64 result

Upload an image to see the Base64 result.

0 characters

Upload an image to see the Base64 result.

Usage examples

The examples are shortened for display. The copy buttons copy the complete HTML or CSS.

About Image to Base64 Converter

Our free image to Base64 converter transforms image files into Base64-encoded text strings that can be embedded directly in HTML, CSS, JavaScript, or JSON. Simply upload or drag and drop an image, and the tool instantly generates a complete data URI ready to use in your code.

Base64 encoding converts binary image data into a text format using a 64-character alphabet. This makes it possible to include images inline within text-based documents, eliminating the need for separate image file requests. While Base64 encoding increases the data size by approximately 33%, the trade-off is worthwhile for small images like icons, logos, and thumbnails where reducing HTTP requests improves page load performance.

The Base64 string is ready as soon as you select an image. Your image is never uploaded, making the tool safe for encoding proprietary graphics, confidential screenshots, or any sensitive visual content. The tool supports all major image formats up to 10MB in size.