Choose the output your project expects
A data URL combines the detected MIME type and Base64 bytes. Raw Base64 omits that prefix for APIs that take the type separately. HTML output adds an image element with escaped alternative text, while CSS output provides a background-image declaration. These snippets are displayed as text and never executed here.
Preserve the exact image file
Encoding does not resize, compress, strip metadata or change animation. Decoding the Base64 returns the original bytes. Embedded location or author information remains present. Use Image format converter first if you want a fresh still-image export without metadata.
Use inline images thoughtfully
Base64 uses four characters for each three input bytes, with padding for the final group. It increases uncompressed size by roughly one third. Large inline images make documents harder to edit and cannot be cached separately; ordinary image URLs are usually more practical for larger website assets. Support for data URLs depends on the application and its content security policy.
Limits and preview behavior
One PNG, JPG, WebP, GIF or UTF-8 SVG at a time, up to 5 MiB; SVG is limited to 512 KiB and must be well-formed with the SVG namespace. SVG document/entity declarations are rejected, but original SVG content is not sanitized and is never rendered here. Raster format detection reads image headers, not complete pixel integrity. Snapshot failures do not alter the encoded bytes.
Raster previews are static and limited to 12 million pixels and 4,096 pixels per side. Larger supported headers can still be encoded without decoding pixels. The output field shows up to 4,096 characters; Copy and Download include everything. Encoding runs in a local worker with a 15-second deadline; Cancel processing terminates it while preserving any previous output. Undo changes restores the image, snapshot and output settings after edits or Clear; an accepted replacement ends recovery. No image, code or metadata is uploaded or saved.