Image to Base64

Upload an image and get Base64 text you can paste into HTML, CSS or code.

|

or drop a file here

|

Upload an image and click Convert to see the Base64 here.

How Image to Base64 works

Turns an image file into Base64 text you can paste into HTML, CSS, JSON or code. Upload the image, then click Convert.

Choose Raw Base64 for the encoded text alone, or Data URL for text that starts with data:image/png;base64, and works directly in an img src or a CSS url(). You can switch between the two after converting.

Input to Image to Base64

  • Upload or drag and drop one image file.
  • Supported types: PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG.
  • A preview shows the file name, size and width and height before you convert.
  • Files up to 20MB. Everything runs in your browser, so your image never leaves your computer.

Output from Image to Base64

  • Base64 text in an editor, with the size of the text shown.
  • Copy it, download it as a .txt file named after your image, or open it in full screen.
  • Base64 text is about one third larger than the image file.
  • For the other way around, use Base64 to Image.