Base64 Image
Free online base64 image tool, no installation required
About Image to Base64
Convert any image file into a Base64 data URI (or raw Base64) for inline embedding in HTML, CSS, or JSON. Supports drag-and-drop or click-to-upload of any browser-supported image type, shows a live preview, and reports the file name, size, and MIME type. Output can include or exclude the data: prefix via a checkbox.
How to Use
1. Drag an image onto the drop zone, or click it to open the file picker (accept="image/*").\n2. Preview the image and read its file name, size, and MIME type.\n3. Toggle the "Include data URI prefix" checkbox to switch between the full data: URI and raw Base64.\n4. Copy the output, download it as a .txt file, or clear it with the X button. The output's character length is shown beneath it.
Data URI Format & Output Options
Files are read with FileReader.readAsDataURL, which yields a string of the form data:<mime>;base64,<base64>. With the prefix checkbox on, the full string is output (ready to drop into an <img src> or CSS url()). With the checkbox off, only the base64 portion after the comma is output. File sizes are displayed in B, KB, or MB. Only files whose MIME type starts with image/ are accepted; everything else is rejected with an error toast.
▶What image formats are supported?
▶What is the difference between the two output modes?
▶Is there a file size limit?
▶Are the images uploaded anywhere?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee