Image to Base64
Turn any image into a data URI, CSS or HTML snippet — or paste Base64 to get the picture back. Nothing leaves your browser.
Settings
Data URI
How to Use Image to Base64 in 3 Steps
Drop an image
Drag any image onto the left pane — or paste a Base64 string or data URI into the box below it to decode.
Pick the snippet
Settings switches between a data URI, raw Base64, a CSS rule, an HTML tag or Markdown.
Copy or download
The text updates instantly. Copy it, download it as a .txt, or download the decoded image.
Image to Base64 — Frequently Asked Questions
Is my image uploaded anywhere?
No. The image is decoded and processed on a canvas in your browser tab. Nothing is sent to a server, and nothing is kept after you close the page.
Is the original file encoded byte-for-byte?
Yes. The file's exact bytes are encoded — no re-compression — so decoding the string gives back the identical file.
Why is the Base64 bigger than the file?
Base64 stores 3 bytes in 4 text characters, so it is always about 33% larger. Inline only small images (icons, logos under ~10 KB); link larger ones.
Can I decode Base64 back to an image?
Yes — paste a data URI or raw Base64 into the box under the dropzone. Raw strings are recognised by their PNG, JPG, GIF, WebP or SVG signature.
Does it work with SVG?
Yes. SVG is encoded like any other file and the data URI uses the image/svg+xml type.