Running on your device · 0 bytes uploaded

Image ⇄ Base64

Image files to data URLs and back — format read from bytes, dimensions decoded, nothing re-encoded or uploaded.

Your image

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

Any image up to 50 MB — the format is read from magic bytes, not the extension
Rules this tool follows
  • 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.
Nothing in yet

Paste, drop, or type to begin. Everything stays on this device.

Nothing in yet

Paste, drop, or type to begin. Everything stays on this device.

files up to 50 MB — bytes pass through exactly; a JPG stays the same JPG inside the data URL