# Image to Base64

[Home](/)

[Tools](/#tools)

Get the data URI plus ready-to-paste CSS and HTML — and decode Base64 strings back into files.

Drop an image here, or click to choose

Small images only — under ~50 KB is the sensible zone

Data URI Copy

Raw Base64 Copy

CSS Copy

HTML Copy

## Decode Base64 back to an image

Paste Base64 or a data URI

## How to use

1. Drop a small image and wait for the data URI, raw Base64, CSS and HTML fields.

1. Copy the form your destination expects, or paste a Base64 value into the decoder below.

1. Test the pasted result in its destination before removing the original file.

## Best results

Use a normal image file for photos and anything that benefits from browser caching. Base64 is most useful for a small, self-contained asset; it adds about 33% to the binary size and is not encryption.

## When Base64 is the right call

Embedding an image as a data URI removes one HTTP request — worthwhile for tiny, render-blocking assets: icons in CSS, email signatures, single-file HTML documents. The encoded text is about **33% bigger** than the binary and cannot be cached separately, so past a few tens of kilobytes a normal file wins.

## Base64 is not encryption

It is a plain re-encoding that anyone can reverse (that is literally what the decoder below does). Never treat it as a way to hide image contents. And if the real goal is a lighter page, embedding rarely beats simply [making the image smaller](/articles/reduce-image-file-size-for-web/).

## Frequently asked questions

### When should I embed an image as Base64?

For tiny assets where saving one HTTP request matters: icons inside CSS, email signatures, single-file HTML pages. Past a few tens of kilobytes, a normal cached image file is faster.

### Why is the Base64 version bigger than my file?

Base64 represents 3 bytes of binary as 4 characters of text, so output is ~33% larger by design. That is the price of being able to paste binary data into text formats like HTML, CSS and JSON.

### Is Base64 a way to protect or encrypt an image?

No. It is a reversible re-encoding, not encryption — the decoder on this very page turns it straight back into the image. Never use it to hide sensitive content.

## Standards and references

- [RFC 4648: Base-N encodings](https://www.rfc-editor.org/rfc/rfc4648)

- [Data URL reference](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data)

## Related tools

[→Image ConverterPNG, JPG and WebP — batch convert in one drop.](/convert/)

[→SVG to PNGRender SVG markup or files to crisp PNG at any scale.](/svg-to-png/)

[→Favicon GeneratorOne image in, every favicon size + a real .ico out.](/favicon/)
