Image to Base64 Converter

Turn an image into a Base64 data URI you can paste into HTML, CSS or JSON, or turn Base64 back into an image file.

FreeNo sign-upPrivate — runs in your browser
Preview
Type—
Dimensions—
File size—
Base64 size—
Result

How to use the Image to Base64 Converter

  1. Choose an imageDrop an image, click to pick one, or paste a screenshot with Ctrl+V. Nothing is uploaded.
  2. Pick the outputGet a full data URI, plain Base64, an HTML <img> tag, a CSS background rule, Markdown or a JSON string.
  3. Or decode Base64Switch to Base64 → Image, paste a data URI or raw Base64, preview it and download the image file. The type is detected automatically.

Example

A 2 KB PNG icon becomes a data URI of about 2.7 KB: Base64 is about 33% larger than the original file.

Paste iVBORw0KGgo… without a data: prefix and the tool recognises it as a PNG from its first bytes.

Frequently asked questions

When should I use Base64 images?

For small icons and images under about 10 KB, embedding saves an extra request. For larger images it usually slows the page down, because Base64 is a third bigger and cannot be cached separately.

Why is the Base64 bigger than the file?

Base64 uses 4 text characters for every 3 bytes, so it is always about 33% larger, plus the short data:image/…;base64, prefix.

Is my image uploaded?

No. The file is read and converted by your browser, so private screenshots and documents never leave your device.

Popular posts from this blog

Character Counter

Speech to Text Online

Keyboard Tester