gettoolz.app

Image to Base64

Turn an image into a Base64 data URI, ready to paste into CSS, HTML or JSON — nothing uploaded.

Part of image tools and developer tools.

A data URI, a CSS rule or an img tag

The same Base64 text is wanted in different wrappers. A data URI —data:image/png;base64,… — goes anywhere a URL does. The CSS form drops it into a background-image; the HTML form is a complete <img> with the width and height already filled in, so the page does not jump when it loads. “Base64 only” is the bare string a JSON API or a config file usually expects.

When inlining an image is worth it

Base64 turns every three bytes into four characters, so the inlined image is about 33% heavier than the file, and it can no longer be cached separately from the page or stylesheet that carries it. That trade pays off for small things — an icon, a tiny logo, a placeholder, an image in an HTML email — and stops paying somewhere around 10 kB. Past that, a normal image URL is lighter.

The exact bytes of your file, encoded locally

The file is read and encoded inside this tab, never uploaded. Nothing is re-compressed either: decode the Base64 and you get back the file you picked, byte for byte, metadata included — strip it first with the EXIF remover if the image is a photo.