Skip to content
ConvertPassConvertPass home

Image

Image to Base64

Turn an image into Base64 or a data URI without uploading it.

This tool processes files and text locally in your browser. Your content is not uploaded or stored by this site.

Drop files here or

What this tool does

The file bytes are read and encoded. You can copy raw Base64 or a data URI with the detected MIME type.

How to use it

  1. Drop an image.
  2. Copy Base64 or the data URI.
  3. Avoid inlining large photos in CSS.

Supported input

  • An image file up to 25 MB

Output

  • Base64 or data URI text

Privacy

This tool processes files and text locally in your browser. Your content is not uploaded or stored by this site.

ConvertPass does not include your input in analytics, URLs, or error reports. Encoding: Raw file bytes, not a re-encode. Limit: 25 MB (25.00 MB).

Limitations

  • This is the original file bytes, including metadata.
  • A 25 MB data URI will freeze some editors.

Example

Input
1×1 PNG
Output
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==

Troubleshooting

The data URI does not display elsewhere
Include the data: prefix and MIME type. Some markdown hosts block data URIs.

FAQ

Does this strip EXIF?

No. It encodes the file as-is. Strip metadata first if that matters.

When should I use a data URI?

Tiny icons where an extra HTTP request is worse than a few hundred bytes. Not for photographs.

Is the MIME type guessed?

It uses File.type when present, otherwise application/octet-stream.

Can I convert back?

Yes, with Base64 to image.

Related tools

Related guides

Related formats

Last reviewed 16 August 2026. Report a problem. Reports do not include your input.