Image to Base64 Converter

Turn any image into a Base64 data URI you can paste straight into HTML, CSS or JSON. Or paste Base64 text to see and download the image it contains.

  • 100% free
  • No sign-up
  • Files never leave your device
Drop an image here or click to chooseAny image format · you can also paste
How to use

How to use the Image to Base64 Converter

  1. Choose Image to Base64 and drop your image.
  2. Pick the output style: data URI, plain Base64, CSS, HTML or Markdown.
  3. Copy the code or download it as a text file.
  4. To decode, switch to Base64 to image, paste the text and click Show image.

Private by design. Your images are processed by your own browser. They are never uploaded to a server, so even private or confidential photos stay on your device.

About this tool

When should you inline images as Base64?

Base64 turns binary image data into plain text, so it can live inside HTML, CSS, JSON or an email template. That saves a separate network request, which is useful for tiny icons, email signatures and small embedded graphics.

The trade-off is size: Base64 is about 33% larger than the original file, and inlined images cannot be cached separately by the browser. For anything bigger than a small icon, a normal image file is usually faster.

Good to know

Base64 good practice

Keep it small

Inline icons and logos under a few kilobytes. Serve larger images as files.

Prefer SVG for icons

SVG icons are often smaller and sharper than Base64 PNGs.

Mind email clients

Some email clients block data URIs, so test before sending a campaign.

Decode to check

Use the decode tab to confirm a Base64 string really is the image you expect.

FAQ

Image to Base64 Converter FAQs

What is a data URI?

A string that starts with data:image/png;base64, followed by the Base64 data. Browsers can display it like a normal image URL.

Why is the Base64 bigger than my image?

Base64 uses four characters for every three bytes, so it is about a third larger.

Can I convert Base64 back to an image?

Yes. Use the Base64 to image tab and download the decoded file.

Is my image uploaded?

No. Encoding and decoding happen in your browser.

Need help with visuals that sell?

Our digital marketing team creates and optimises images, ads and social content that perform.