Image ↔ Base64
Drag & drop image to convert, or paste string to preview.
Drop Image Here
or paste Base64 on the right
PNG, JPG, GIF, WEBP, SVG
0 charsAuto-detects format on paste
Performance Note:
Base64 strings are ~33% larger than the original file. Large images (>5MB) may cause the text area to lag, but the conversion will still work.
Frequently asked questions
Why would I inline an image as Base64?
A Base64 data URI embeds the image directly in your CSS or HTML, saving an HTTP request. It is ideal for small icons and sprites, though large images bloat the file and are better served normally.
Is my image uploaded?
No. The image is read and encoded entirely in your browser using the FileReader API — it never leaves your device.
How much larger does the image get?
Base64 encoding adds roughly 33% to the byte size, so a 30 KB image becomes about 40 KB of text. Keep that trade-off in mind when deciding whether to inline.