Image ⇄ Base64

Turn any image into a Base64 data URI — with copy-ready HTML and CSS — or decode a Base64 string back into a downloadable image.

🔒 100% private — your files never leave your device
Drop, browse, or paste an image
Ctrl / Cmd + V works too — it becomes a Base64 data URI
PNG JPG WEBP GIF SVG
Original size
Base64 size
Type

How it works

Encode or decode in a couple of clicks — no sign-up, no upload, no wait.

1

Add your image or string

Drop, browse or paste an image to encode — or paste a Base64 string to decode.

2

Grab the result

Copy the data URI plus ready-to-paste <img> and CSS snippets, or preview the decoded image.

3

Use it anywhere

Embed the data URI inline in HTML or CSS, or download the decoded image to your device.

What is a Base64 data URI?

A data URI encodes an image directly inside your markup as text, so the browser never makes a separate network request for it. That can speed up small icons and avoid extra files, at the cost of roughly 33% larger bytes than the original binary — Base64 represents every 3 bytes as 4 characters. It is best for tiny assets; large images are usually better left as normal files.

🔒

Private by design. Encoding and decoding happen entirely in your browser using the native File and Canvas APIs. Your images are never uploaded — we never see them.

Frequently Asked Questions

What is a Base64 data URI?
It's a way of writing an image as plain text so it can live directly inside your HTML or CSS. Instead of linking to a separate image file, the whole picture is embedded as a long string of characters.
Why would I embed an image as Base64?
It lets you ship an icon or small graphic without a separate file request, which can be handy for emails, single-file pages or small inline assets. It works best for small images.
Can I turn a Base64 string back into an image?
Yes. Switch to the Base64 → Image tab, paste your string, and download it back as a normal image file.
Which image formats can I encode?
PNG, JPG, WEBP, GIF and SVG all work. You can drop a file, browse for one, or paste an image straight from your clipboard.
Why is the Base64 string bigger than my original file?
Base64 text is always roughly a third larger than the original image, so this method is best kept for small images rather than large photos.
Are my files uploaded to a server?
No. Encoding and decoding both run entirely in your browser on your own device — your files never leave your device and we never see them.