>_
b64

Image to Base64

Convert an image to a Base64 data URI and copy it as HTML, CSS, Markdown or a ready-made Claude API image block — or decode Base64 back into a downloadable image.

Runs locally — your input never leaves this page.

How to use

  1. Drop, paste or choose an image. It is read locally and converted immediately.
  2. Choose the output format: data URI, raw Base64, an <img> tag, a CSS background, Markdown, or a JSON image block for multimodal LLM APIs.
  3. To go the other way, switch to “Base64 → Image”, paste a data URI or raw Base64, and download the decoded file.

FAQ

When should I inline images as Base64?

For tiny icons, email templates and single-file HTML. Base64 is about 33% larger than the binary and can’t be cached separately, so keep regular images as files.

How do I send an image to a vision model?

Most LLM APIs accept Base64 images in the request. The “Claude API image block” output gives the exact {type, source: {type: "base64", media_type, data}} object; OpenAI accepts the data URI as an image_url.

The decoder says it can’t read my string.

Make sure the whole string was copied — Base64 images are long and often truncated. Raw Base64 without a data: prefix is detected from its first bytes (PNG, JPEG, GIF, WebP, SVG).

Report a bug or suggest a feature →