LOADING
PLEASE WAIT...
LOADING
PLEASE WAIT...
Convert any image into a Base64 data URI you can paste into HTML (img src), CSS (background) or JSON. Optional resize to keep the string small.
OR DRAG & DROP HERE — JPG · PNG · WEBP · GIF
A data URI embeds an image directly in text instead of a file: it starts with data:image/png;base64,… and contains the whole image encoded. You can put it in an <img src>, a CSS background-image or a JSON field — no separate file to host.
Base64 adds about 33% on top of the image bytes. A 100 KB file becomes roughly a 133 KB string. That is why this tool lets you resize and pick WebP — keeping the image small keeps the string manageable.
For large photos, a normal file is better — the browser caches it, while a huge data URI slows every page load.
The encoding runs entirely in your browser. Your image is never sent to any server and never stored.
It is a text string that contains the entire image, starting with data:image/png;base64,. Browsers can render it directly in <img src>, CSS background-image and JSON fields, without hosting a file.
Yes, about 33% bigger: Base64 encodes every 3 bytes as 4 characters. A 100 KB image becomes roughly 133 KB of text, which is why resizing to a smaller width is recommended.
Large data URIs are thousands of characters long. The preview shows the beginning so the page stays fast — the full string is copied to your clipboard when you press COPY.
For large photos. Files are cached by the browser and load once; a big data URI is parsed on every page load and bloats HTML or CSS. Keep data URIs for small icons and logos.
Yes: resize the image to a smaller max width, choose WebP (usually the smallest format), and lower the quality slider for JPEG/WebP. PNG stays lossless, so it is usually the biggest.
No. Everything runs locally in your browser — the image and the generated Base64 never leave your device.