Drag and drop an image here, paste one with Ctrl+V, or choose a file.

JPEG, PNG, WebP, GIF, BMP or AVIF, up to 50 MB. Your image stays on your device.

Result

Choose an image to get its Base64 data URI.

How to use this tool

  • Add an image (up to 10 MB).
  • Choose the output: a full data URI, plain Base64, an HTML <img> tag (with width and height) or a CSS background-image rule.
  • Copy the result with Copy result.

How it works

The original file bytes are encoded exactly as they are — no re-compression — using Base64, which represents every 3 bytes as 4 text characters. A data URI adds the file type in front: data:image/png;base64,….

Example

Size overhead

A 3 KB icon becomes about 4 KB of Base64 text — Base64 is always about a third larger than the file.

Privacy and limitations

  • The image is read on your device and never uploaded.
  • Data URIs are best for very small images (icons, tiny backgrounds). Large inline images make pages heavier and cannot be cached separately.

Frequently asked questions

When should I inline images as Base64?

For tiny images where saving an extra request matters, in HTML emails, or when a single self-contained file is needed. For normal images, separate files are faster.

Can I convert Base64 back to an image?

Yes — paste the data URI into a browser address bar, or decode it with the Base64 tool.