Image to Base64 Converter

Convert images to Base64 for CSS/HTML, or decode Base64 back to an image. 100% private.

Click to choose an image

Converted locally, never uploaded

Base64 encoding turns binary data (like an image) into plain text, which can then be embedded directly inside HTML or CSS instead of linking to a separate image file — useful for small icons, avoiding extra network requests, or embedding images in places that only accept text (like some JSON APIs or email templates).

This tool converts an image to its Base64 representation (and back again) entirely in your browser — the image is never uploaded anywhere.

Step-by-step instructions

  1. 1

    Choose a mode

    Image → Base64 to encode, or Base64 → Image to decode.

  2. 2

    Upload or paste

    Choose an image file, or paste a Base64 string to decode.

  3. 3

    Copy or download

    Copy the Base64 string (or a ready-to-use CSS snippet), or download the decoded image.

Common use cases

Embedding small icons in CSS

Avoid an extra HTTP request for tiny, frequently-used images by inlining them as a data URI.

Embedding images in JSON/APIs

Some APIs and data formats only accept text — Base64 lets you include image data within them.

Email template images

Some email clients handle inline Base64 images more reliably than linked ones.

Tips for best results

  • Base64 encoding increases file size by roughly 33% — it's best suited for small images (icons, small logos), not large photos.

Frequently asked questions

Does this tool upload my image?

No — encoding and decoding both happen entirely in your browser; nothing is sent to a server.

What's a 'data URI'?

It's the full string (starting with data:image/png;base64,...) that browsers can use directly as an image source — this tool's Base64 output is already in that format, ready to paste into src or CSS.