📁
Drop an image here or click to browse
JPG · PNG · WebP · GIF · SVG · Any image format
Works with any file size - very large images just produce longer Base64 text
🖼
File-
Size-
Type-
Dimensions-
How it works
01

Upload your image

Drop in any image file, or click to browse. It's read locally - nothing is sent anywhere.

02

Choose the output type

Pick a full Data URI (ready to paste into HTML/CSS) or raw Base64 with no prefix.

03

Copy or download

Grab the code with one click, or save it as a .txt file - instantly, no sign-up required.

ℹ About Base64 image encoding

Base64 turns binary file data into plain text made only of letters, numbers, +, / and =. That makes it safe to drop straight into HTML, CSS, JSON, or an API payload - anywhere raw binary isn't allowed.

A Data URI wraps that text with a small header (data:image/png;base64,…) that tells the browser what kind of file it is, so it can be used directly as an <img src> or a CSS background-image with no extra file to host.

Frequently Asked Questions

Is my image uploaded anywhere?

No. The file is read locally with the browser's FileReader API and encoded on your device - it never leaves your computer.

What's the difference between a Data URI and raw Base64?

A Data URI includes a prefix like data:image/png;base64, so it can be pasted directly into an img src or CSS background-image. Raw Base64 is just the encoded text with no prefix, useful for APIs or databases that add their own MIME type.

Does Base64 make the file bigger?

Yes, roughly 33% larger than the original binary file, since every 3 bytes becomes 4 text characters. It's convenient for embedding but not for storage efficiency.

Which image formats are supported?

Any of them. The tool encodes the raw bytes of whatever file you drop in, so JPG, PNG, GIF, WebP, SVG, BMP, ICO and even formats your browser can't preview will all convert correctly.