Base64 Image Encode / Decode
Drop an image file and get a Base64 data URI you can embed directly in HTML or CSS. Or paste a data URI and see the image preview instantly. Supports PNG, JPEG, WebP, and GIF. Everything runs locally — your images never get uploaded anywhere.

What it does
- ▸Converts PNG, JPEG, WebP, and GIF images to Base64 data URIs
- ▸Decodes Base64 data URIs back to viewable images with a preview
- ▸Handles large images without issue (processing is local)
- ▸Generates the full data: URI string ready to paste into HTML or CSS
Use cases
- ▸Embedding small images directly in HTML or CSS to reduce HTTP requests
- ▸Previewing a Base64-encoded image from an API response
- ▸Converting an image to a data URI for use in an email template
- ▸Inspecting Base64 image data from a database or config file
How it works
Drop an image file onto the input pane, or paste a Base64 data URI
If encoding: the tool generates a data: URI with the correct MIME type
If decoding: the tool shows a preview of the image
Copy the data URI or save the decoded image
Frequently asked questions
1Is there a file size limit?
There's no hard limit, but very large images produce very large data URIs. For anything over a few hundred KB, consider whether a data URI is the right approach — it increases the HTML/CSS file size and can't be cached separately.
2Does it preserve image quality?
Yes. Base64 encoding is lossless — the decoded image is byte-identical to the original. No compression or quality loss occurs during encoding or decoding.
3Can I use this for SVG files?
Yes, though for SVGs you're better off using the SVG Optimizer first to reduce file size, then encoding the optimized SVG as a data URI. The SVG to CSS tool does this in one step.
Related tools

Base64 String Encode/Decode
Encode and decode Base64 strings (unicode-safe)

SVG to CSS
Turn an SVG into a CSS background-image data-URI snippet

Image Compress & Convert
Compress images, convert between WebP/JPEG/PNG and resize — fully offline

EXIF / Metadata Stripper
Remove EXIF, GPS, XMP and other metadata from photos — lossless
Use Base64 Image Encode/Decode offline in Devinity
All 95 tools run locally on your Mac. No internet required, no data sent to servers.
Download Devinity →