Skip to content

Image to Base64

Get a data URI to paste straight into CSS or HTML.

Runs in your browser

About Image to Base64

A data URI lets you embed a small image directly in CSS, HTML or a JSON payload without a separate file request. Drop an image to get the Base64 string, ready to paste, along with the exact CSS and HTML snippets.

  • Base64 is about 33% larger than the original file, so only inline images under a few kilobytes.
  • SVG icons can be embedded as plain text instead, which is smaller than Base64.
  • The output keeps the original format and MIME type.

How to use it

  1. 1Drop an image or paste one from the clipboard.
  2. 2Copy the raw Base64, the data URI, or a ready-made CSS or HTML snippet.
  3. 3Paste it into your code.

Questions

When should I inline an image?
For tiny icons, placeholders and single-use images where avoiding a network request matters more than the extra bytes.
Is there a size limit?
No hard limit, but anything over around 10 KB is usually better served as a file.
Is my image uploaded?
No. Everything runs in your browser, so your photos never leave your device.

More convert tools