CONVTOSOMETHING.

Image to Base64 Converter

Encode images to Base64 with ready-to-paste data URI, CSS and HTML snippets - or paste Base64 and get the image back. Everything runs in your browser. No sign-up, no limits, free.

Input

Drop your image here

PNG, JPG, WebP, GIF, SVG, BMP or ICO · small files embed best

or click to browse · paste works too
Output

Base64 makes files ~33% bigger. Embedding works best under 10 KB; above that, link the file instead.

Runs 100% in your browser No size or file limits Free, no sign-up

How to convert an image to Base64

Add your image

Drag and drop an image anywhere in the box, click to browse, or paste it straight from your clipboard. PNG, JPG, WebP, GIF, SVG, BMP and ICO all work.

Pick the snippet you need

Switch between raw Base64, a complete data URI, a CSS background-image rule, or an HTML img tag. The output updates instantly.

Copy and paste it

Click Copy and drop the snippet into your stylesheet, HTML or code. To go the other way, switch to Base64 → Image, paste any Base64 or data URI, and download the decoded file.

Image and Base64 questions, answered

What is Base64 encoding?

Base64 turns binary data into plain ASCII text using 64 safe characters, so an image can live inside a text file: HTML, CSS, JSON or an email. The text is about 33% larger than the original file, which is the price of making it copy-pasteable.

When should I embed an image as Base64?

Embedding shines for small assets: icons, logos, tiny backgrounds under roughly 10 KB. It saves an HTTP request and keeps a component self-contained. For bigger images a normal file link is faster, caches properly, and does not bloat your document.

How do I use the Base64 in CSS or HTML?

Use the ready-made variants: the CSS tab gives you a complete background-image rule and the HTML tab a complete img tag. Both wrap the same data URI, which is the Base64 payload prefixed with its content type.

Can I convert Base64 back to an image?

Yes. Switch the tool to Base64 → Image, paste raw Base64, a data URI, or even a whole CSS rule or img tag - the payload is detected automatically, the format is identified from the data itself, and you download the file it contains.

Why is my Base64 string rejected?

Usually the string is incomplete: a missing tail from a partial copy breaks decoding. Paste the full value including any data:image prefix. Strings that decode but are not image data are rejected too, with a clear message either way.

Is my image uploaded to a server?

No. Encoding and decoding are pure text operations that your browser performs locally. Neither your images nor your Base64 strings ever leave your device.