All tools · 🔤 Encode / Decode

🖼️ Image to Base64

Drop or pick any image file — we convert it to a Base64 data URL you can paste directly into CSS background-image, HTML src, or JSON. The image never leaves your browser. Supports PNG, JPG, GIF, SVG, WebP, AVIF.

Loading tool…

Examples

CSS background
Outputbackground-image: url('data:image/png;base64,iVBORw0KGgo…');
HTML img tag
Output<img src="data:image/jpeg;base64,/9j/4AA…" alt="" />

Frequently asked questions

When is inlining images useful?

Tiny icons (under ~1 KB) and email templates that cannot reference external images. For everything else, real image URLs cache better and load faster.

Why does Base64 bloat the file?

Each 3 bytes of binary becomes 4 ASCII characters — about 33% larger. Plus the data URL syntax adds a few bytes of overhead.

Is it safe to convert sensitive images?

The conversion runs in your browser only — nothing is uploaded. Open DevTools → Network tab to verify.

About this tool

Image to Base64 runs entirely in your browser using standard Web APIs. No data is sent to any server. The source for this tool is in our public GitHub repository.

Related tools

← All 96 tools

Why this tool

vs typical free web-tool sites

1vwTypical free site
PriceFreeFree
Signup requiredNoOften (for premium features)
Ads inside the toolNoYes (banner + video)
Data sent to serverNo (browser-only)Yes (inputs analyzed for ads)
Total tools96Often <20 or scattered across sites
Bookmarkable URL per toolYesMixed
Loads in under 1sYes (static)Often slow (ad tracking)
MultilingualEN / ES / PT / FR / DEUsually EN only
Open sourceYesNo