Image to Base64

Processed in this browser

Text limit: 2000000 characters

File limit: 32 MB

This tool never uploads your input.

Drop a file

Drop a file here or choose one.

Sample workflow: choose a JPEG, PNG, WebP, or GIF on this device, then Process.

Encode a picture as a data URI or turn a data URI back into a file in this tab. This is the image job. Plain text Base64 and generic file Base64 live on sibling pages.

You need a data:image/png;base64,... for a tiny icon in a test HTML file, or you have a data URI and want the PNG back. That is this page.

Base64 is text. File Base64 is any file without the image URI helper.

When a data URI is reasonable

  • Small icons in a single-file demo.
  • Email signatures you control (still watch size).
  • Debugging what a canvas exported.

When it is not: hero photos, a whole design system, or anything you will cache as a real .webp.

How to use it

  1. Drop a still, or paste a data URI.
  2. Copy the URI or download the file.
  3. Fence the URI in code if you publish a sample:
<img alt="" src="data:image/png;base64,...." />

Typical ceiling is about 32 MB.

Honest limits

  • Not encryption.
  • Not an image CDN.
  • Huge URIs will freeze a text editor.

To change format first, use image format converter.

FAQ

Should I inline a 4 MB photo in CSS?

Usually no. Data URIs add about a third more bytes and wreck caching. Tiny icons are the usual case.

Is this the same as the Base64 text box?

The text tool encodes UTF-8 strings. The file tool encodes any bytes. This one speaks image / data-URI.

Can I decode a data URI I already have?

Yes — paste or drop it back to a file if the payload is an image the browser understands.

HEIC?

Convert to JPG first if the browser cannot build a data URI from HEIC.

Is the image uploaded?

No. Typical ceiling is about 32 MB.

Related tools