Tools Guides
developer Free No signup

Image to Base64 Converter

Convert any image file to a Base64-encoded data URI string.

Loading tool…

About this tool

Upload an image by drag & drop or file picker and instantly get the Base64-encoded data URI. Choose whether to include or omit the data prefix. Handy HTML and CSS snippets are generated automatically so you can embed the image inline.

How to use

  1. 1 Step 1: Drag and drop an image onto the upload area, or click it to browse for a file.
  2. 2 Step 2: A preview of the image and the Base64 output appear automatically.
  3. 3 Step 3: Toggle 'Include data URI prefix' to control whether the output starts with data:image/...;base64,.
  4. 4 Step 4: Click Copy to copy the string, or grab the ready-made HTML / CSS snippets below.

Frequently Asked Questions

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}