Skip to main content

Base64 Image Encoder

Turn images into Base64 data URIs to paste into HTML, CSS or JSON, one or many at a time.

Images

Encoded

Each image becomes a data URI you can paste into HTML, CSS or JSON.

Runs in your browser; nothing you enter leaves this page.

How it works

Encoding

Open or drop one or more images and each becomes a data URI of the form data:image/png;base64,… with its original bytes, so the picture is unchanged. Base64 writes every 3 bytes as 4 characters, so the text is about a third larger than the file.

Each image has three copy buttons: raw Base64 without the prefix, the full data URI, and a ready-made CSS background-image rule.

characters = ceil(bytes / 3) × 4

Limits

Files over 5 MB are skipped with a message, because a data URI that long freezes most text fields. Files that are not images are skipped too. The rest still encode.

More tools

All 238 tools