Image to Base64 / Data URI Converter

Turn an image into a Base64 data URI you can paste straight into HTML (img src) or CSS (background) — no separate file needed. Works with PNG, JPG, SVG, GIF and WebP. The image is processed in your browser and never uploaded.

FAQ

What is a Base64 data URI?

It's a way to embed a file directly inside HTML or CSS as text instead of linking a separate file. An image data URI looks like data:image/png;base64,iVBOR… and works as an img src or CSS background, so the image loads with no extra request.

When should I inline an image as Base64?

For small images — icons, tiny logos, simple SVGs — where avoiding an extra request helps, or where you need a single self-contained file (an email, a one-file page). For large images it's usually worse: Base64 is ~33% bigger and can't be cached separately.

Is my image uploaded anywhere?

No. Conversion happens entirely in your browser via the FileReader API — the image never leaves your device.

Why is the data URI bigger than my image?

Base64 represents binary data as text, adding roughly 33% to the size. That overhead is why inlining only makes sense for small assets.

More tools: Base64 text encode/decode, image compressor, and the full tools list.