Image to Base64 Converter

Turn an image into a Base64 data URI you can paste into HTML, CSS or JSON, or paste Base64 to preview and download the image.

Image → Base64

Base64 → Image

🔒 Your files never leave your device. This tool runs entirely in your web browser. Nothing is uploaded to ToolsCloset or anyone else, so it’s safe for private photos, recordings and videos.

By Shah Rukh, software developer · Last updated:

How to use a Base64 image

In HTML: <img src="data:image/png;base64,iVBOR…" alt="">
In CSS: background-image: url("data:image/png;base64,iVBOR…");

When to inline images

Shrink images first with the image compressor.

Frequently asked questions

Is my image uploaded?

No. The conversion happens in your browser.

Which formats are supported?

Any image your browser can open: PNG, JPG, WebP, GIF, SVG, AVIF, BMP and ICO.

Why won’t SVG Base64 preview?

SVG can contain scripts, so SVG previews are blocked for safety. The conversion to Base64 still works.

Related tools

🔳

QR Code Generator

Free QR codes for links, Wi-Fi, text and contacts.

🏗️

Discord Server Template

Design channels and roles, then build them in one click.

🛡️

Discord Moderation Bot

Make your own mod bot with kick, ban, mute and filters.

🤖

Discord Bot Maker

Build a custom Discord bot without coding.

👋

Discord Welcome Bot

Custom welcome messages and auto-roles for new members.

🎨

Color Picker & Palette

HEX, RGB and HSL codes plus matching palettes.

See all Developer Tools →