Your files stay on your device

# Image ⇄ Base64

Image files to data URLs and back, with the format read from bytes, dimensions decoded, nothing re-encoded or uploaded.
Image → Base64Base64 → image

Drop-in replacement for hand-written data URLs: pick a file, get the exact data:<mime>;base64,… string CSS and HTML consume.

Pick several images. Data URLs appear one per row, each copyable.

- The format is read from magic bytes, not the file name: a renamed .jpg that is really a PNG is reported: and encoded , as PNG. SVG (text, no magic bytes) falls back to the declared type, disclosed.
- Nothing is re-encoded: the data URL carries your exact bytes, so a JPG stays the same JPG. Conversion here is a change of representation, not of compression.
- The Base64 half reuses the audited Base64 engine. One tested alphabet and validation path, not a second implementation. Data URL is the default output because that is what CSS/HTML consumes; the bare string is one click away.
- Dimensions come from a native decode of the actual file (Image.decode): reported, never guessed from headers.
Paste, drop, or type to begin. Everything stays on this device.Paste, drop, or type to begin. Everything stays on this device.

## More encoding tools

- [Base64](/encoding/base64)
- [Format support](/images/format-support)
[All encoding tools](/encoding)

---

Canonical HTML: https://nutter.tools/encoding/image-base64/
Markdown version: https://nutter.tools/encoding/image-base64/index.md
Plain-text version: https://nutter.tools/encoding/image-base64/index.txt
Agent index: https://nutter.tools/llms.txt

