How browser Base64 encoding works
- Drop any image file to read raw bytes locally using FileReader inside your browser.
- Optionally toggle pre-encoding compression or max width scaling to keep inline payloads small.
- Switch cleanly between Data URI, Raw Base64, HTML img tag, and CSS background snippets with one-click copy.
Generated code snippets
| Tab | Format | Target Use |
|---|---|---|
| Data URI | data:image/...;base64,... | JSON fixtures and canvas scripts |
| Raw Base64 | Standard RFC 4648 string | REST payloads and storage blobs |
| HTML Tag | <img src="..."> | Single-file email templates |
| CSS Background | background-image: url(...) | UI icons inside bundled stylesheets |