Media

Image to Base64

Turn any image into a data URI, CSS or HTML snippet — or paste Base64 to get the picture back. Nothing leaves your browser.

Drop an image or paste Base64
Source No file loaded
Drop an image here or click to browse
JPG, PNG, WebP, SVG, GIF, ICO — up to 50 MB
Original image
Base64 Awaiting file

The Base64 string appears here

Decoded image
Settings Data URI
How It Works

How to Use Image to Base64 in 3 Steps

1

Drop an image

Drag any image onto the left pane — or paste a Base64 string or data URI into the box below it to decode.

2

Pick the snippet

Settings switches between a data URI, raw Base64, a CSS rule, an HTML tag or Markdown.

3

Copy or download

The text updates instantly. Copy it, download it as a .txt, or download the decoded image.

FAQ

Image to Base64 — Frequently Asked Questions

Is my image uploaded anywhere?

No. The image is decoded and processed on a canvas in your browser tab. Nothing is sent to a server, and nothing is kept after you close the page.

Is the original file encoded byte-for-byte?

Yes. The file's exact bytes are encoded — no re-compression — so decoding the string gives back the identical file.

Why is the Base64 bigger than the file?

Base64 stores 3 bytes in 4 text characters, so it is always about 33% larger. Inline only small images (icons, logos under ~10 KB); link larger ones.

Can I decode Base64 back to an image?

Yes — paste a data URI or raw Base64 into the box under the dropzone. Raw strings are recognised by their PNG, JPG, GIF, WebP or SVG signature.

Does it work with SVG?

Yes. SVG is encoded like any other file and the data URI uses the image/svg+xml type.