Image to Base64 converter, and back

Turn an image into Base64 text to paste into CSS, HTML or JSON, or paste Base64 text back into an image to download. No upload

Image → Base64

Base64 → Image

What is a Base64 data URI?

Base64 turns binary data, like an image, into plain text made of letters, digits, +, / and padding =. A data URI wraps that text with a header (data:image/png;base64,) so a browser knows how to decode it. You can drop a data URI straight into an <img src>, a CSS background-image, or a JSON field, with no separate image file needed.

When to use it

Base64 text is about 33% larger than the original file, so it suits small images (icons, small logos), not large photos.

Questions

Is my image uploaded anywhere?

No. The conversion happens with your browser's own Base64 encoder, and the "Base64 → Image" side decodes entirely on your device too.

Why does decoding say "this does not look like an image"?

Pasted text without a data:image/... header only decodes if the bytes match a known image signature (JPEG, PNG, WebP, GIF or BMP). If you have the header, paste the whole data URI instead.

Can I paste Base64 that's split across several lines?

Yes, line breaks and spaces are ignored when decoding.

Is it really free?

Yes. There is no sign-up, watermark or limit.