Turn an image into Base64 text in your browser and get four copy-ready outputs: the data URI, the raw string, an HTML img tag and a CSS background line.
Your files are processed in your browser, on your own device. Nothing is uploaded to a server.
Base64 turns a picture file into a long string of plain text, so the image can live inside HTML, CSS, JSON or an email template instead of traveling as a separate file. This tool reads your image exactly as it is and hands back four ready to paste outputs: the full data URI, the raw Base64 string on its own, an HTML img tag with the data URI inside it, and a CSS background line.
The MIME type written into each output is read from the file bytes, not guessed from the file name. A PNG that someone renamed to .jpg still gets the PNG type it actually carries, which saves the broken image icon that a wrong label causes. The panel also states the cost of inlining up front: the encoded text runs about a third bigger than the file itself.
The data URI is the complete package: the word data, the MIME type, a note that the payload is Base64, and the string itself. It goes straight into an img src attribute or a CSS url and the browser renders it without fetching any file. The raw string is what APIs and JSON fields usually want, a payload with no wrapper, ready to sit inside quotes in a request body.
The HTML img tag in the download saves a step when the picture is headed for a web page: the tag is built for you with the data URI in place, so only the alt text needs your words. The CSS line does the same for a background image in a stylesheet. All four outputs hold the same picture data. Only the wrapping differs, and the right wrap is the difference between pasting once and fiddling for ten minutes. Running the trip in reverse, from a string back to a picture file, is the job of the Base64 to Image decoder.
Base64 writes three bytes of file as four characters of text, so the encoded string is about a third bigger than the image, every time, with no exceptions. A 30 KB icon becomes about 40 KB of text. A 300 KB photo becomes about 400 KB. A 3 MB photo becomes about 4 MB of characters, a wall of text that bloats a page and cannot be cached on its own. Small icons, logos and one-off images are the right candidates. Big photos belong in files.
Two myths deserve plain words. Base64 is not compression: the string is larger than the file it came from, never smaller. And Base64 is not encryption or protection of any kind. It is a public alphabet that every browser and editor can read in both directions, and anyone who can see the string can rebuild the picture in seconds. Never inline an image you would not simply publish.
The file is read by your browser and encoded in this tab. Nothing is uploaded, which matters when the image is an unreleased screenshot, an internal diagram or a client asset. There is no account, no daily cap and no watermark, here or anywhere in the image tools family.
Because of how the encoding works. Base64 writes every three bytes of the file as four text characters, so the output lands about a third larger than the input, always. A 90 KB image becomes roughly 120 KB of text, and the tool states that cost on the panel before you copy.
No. Base64 is an encoding, not encryption. Anyone who has the string can decode it back to the exact picture with free tools, including the decoder on this site. Treat an inlined image as published.
The raw string is only the encoded picture data. The data URI wraps it with the MIME type and a short prefix, which is the form a browser needs inside an img tag or a CSS rule. APIs and JSON fields usually want the raw string instead.
When the image is large, when it appears on many pages, or when visitors return often. An inlined image cannot be cached separately, so it downloads again inside every page and every style sheet that holds it. Files win in those cases. Small one-off icons are where inlining earns its keep.
Because file names lie. A PNG renamed to .jpg is still a PNG inside, and a data URI labeled with the wrong type can fail to render. Reading the opening bytes of the file gives the true format, so the outputs work on the first paste.
No. Your browser reads the file and builds the string locally. Nothing is sent or stored, there is no sign-up, and closing the tab leaves nothing behind.
Same rules as this one: free, in your browser, with nothing uploaded.
Make a photo lighter without wrecking how it looks.
Set the exact width and height a site demands.
Cut the edges away and keep the part that matters.
A plain background, the right size, ready to print.
Turn a photo 90, 180 or 270 degrees and save it right.
Mirror a picture left to right or top to bottom.
Stamp your name or logo across a photo before sharing.
Brightness, contrast and color fixes on one screen.