A 3 KB icon
3,000 bytes become 4,000 characters of Base64.
Turn an image into a Base64 data URI, with ready-to-paste HTML, CSS and Markdown.
Drag an image here, or choose one
PNG, JPG, WebP, GIF or SVG. It's read on your device — nothing is uploaded.
Runs in your browser — nothing you enter is sent to a server.
Choose an image and get it as a Base64 data URI — the whole file written as text — plus snippets to paste into HTML, CSS or Markdown. The image is read in your browser and never uploaded.
Embedding saves a network request, which suits small icons and images in emails or single-file pages. Base64 text is about a third larger than the file and can't be cached separately, so link larger images as normal files.
Base64 length = 4 × ⌈bytes ÷ 3⌉
Every 3 bytes become 4 characters — a 33% increase.
3,000 bytes become 4,000 characters of Base64.
<img src="data:image/png;base64,iVBOR…" alt="logo">
For tiny images (a few KB) and places that can't load external files, such as some emails. Avoid it for photos.
Many clients do, but some (notably Gmail) block data URIs. Test in the clients your readers use.
For text, use the Base64 Encoder & Decoder. Pasting a data URI into a browser address bar shows the image.
Encode text to Base64 or decode Base64 to text, with full Unicode support and URL-safe output.
Developer Tools
Convert images between PNG, JPG and WebP, with a background color for transparent areas.
Image Tools
Create a complete favicon set — favicon.ico, PNGs, Apple and Android icons — plus the HTML to add them.
Image Tools