Image to Base64
Image & design · Done in 3 steps
- 1Drop an image
- 2
- 3
About
Convert images to Base64 data URLs, CSS backgrounds, HTML img tags or Markdown — and decode Base64 back into a downloadable image.
How to use it
- 1Choose Image → Base64 and drop an image.
- 2Pick the output: data URL, raw Base64, CSS, HTML or Markdown.
- 3Copy or download it.
- 4To decode, switch tabs and paste a data URL or Base64 string.
- You give
- Any image (PNG, JPG, GIF, WebP, SVG, ICO, AVIF) or a Base64 string
- You get
- Data URL / Base64 / CSS / HTML / Markdown snippets, or a decoded image file
- Good to know
- Base64 is about 33% larger than the binary file and can't be cached separately, so only inline small images (icons under ~10 KB). Decoding detects PNG, JPG, GIF, WebP, AVIF, BMP, ICO and SVG.
- Privacy
- Processed on your device. Nothing is uploaded, stored or logged.
- Last tested
- 2026-10-28
FAQ
When should I inline images as Base64?
For tiny icons or images in emails and single-file HTML. For anything larger, a normal image file loads faster and can be cached.
Can I paste Base64 without the data: prefix?
Yes. The decoder accepts raw Base64, URL-safe Base64, full data URLs and even CSS url(...) values, and detects the format from the bytes.
Is my image uploaded?
No — encoding and decoding both happen locally in your browser.
Go further with AI
Thumbnail prompt templates
Concept and generate high-contrast video thumbnails that read at small sizes, with templates for reaction, before/after and object-focus layouts.
Midjourney · Flux · Ideogram
Reference image workflow
Use style, subject and composition references deliberately so the model copies what you want from an image and ignores the rest.
Midjourney · Flux · Ideogram
Lighting and composition guide
The photographic vocabulary that image models respond to, plus a prompt that turns a mood into a concrete lighting and composition spec.
Midjourney · Flux · Ideogram
Image editing prompt recipes
Reliable instruction patterns for AI image editing: remove, replace, recolour, relight and extend without wrecking the rest of the image.
ChatGPT · Gemini · Flux