Upload or drag an image to get its DataURL / Base64, or turn Base64 back into a previewable, downloadable image — with size comparison and img-tag / CSS snippets. 100% client-side.
An inline image is written as data:image/png;base64,iVBORw0KGgo... — a media type, then the encoding, then the file bytes written in Base64. Embedded this way, the image travels with the CSS or HTML and needs no separate request.
The cost is that the file grows by roughly 33%, because Base64 stores three bytes as four characters. A 20 KB PNG becomes about 27 KB of text.
| Scenario | Verdict |
|---|---|
| A repeated 1 KB icon used in many places | Good — removes a request and benefits from CSS caching |
| A 6 KB logo above the fold | Acceptable — saves a round trip on the critical path |
| A 200 KB hero photo | Bad — bloats the stylesheet and delays first paint |
| An image that changes often | Bad — the whole stylesheet must be re-downloaded |
Inline anything under roughly 2 – 3 KB that appears on most pages, and keep everything larger as a separate file. Most build tools automate this threshold automatically, so the decision is usually just whether to enable the feature — and at what byte limit.