Image Base64 Encoder & Decoder
Encode images to Base64 and decode Base64 to images. Free, private, browser-based.
Runs in your browser — nothing is uploaded. Verify it
About the Image Base64 Encoder & Decoder
Encode images to Base64 and decode Base64 strings back to images. Supports PNG, JPG, GIF, WebP, BMP, SVG and AVIF directly, plus HEIC, HEIF, TIFF and ICO, which are converted for you.
Base64 lets you embed images directly in HTML, CSS, JSON, or XML without separate files.
How to use the Image Base64 Encoder & Decoder
- Open the Image Base64 tool and choose the Encoder or Decoder tab.
- To encode: drop in images, pick an output format, and the Base64 appears as each file finishes.
- To decode: paste a Base64 string or data URI and the image renders as you type.
- Copy the output, or download the result.
Frequently asked questions
How do I convert an image to Base64?
Upload your image to the Encoder tab and the Base64 appears automatically. Choose the output format you need — raw Base64, a data URI, an HTML img tag, CSS, JavaScript, JSON, Python, SQL, or Markdown.
Is my image data private?
Yes. Every step — decoding, encoding, and format conversion — runs in your browser using JavaScript. Your images and Base64 strings are never uploaded to any server.
What image formats are supported?
PNG, JPG, GIF, WebP, BMP, SVG and AVIF are read directly. HEIC, HEIF, TIFF and ICO are converted to PNG first, so they work in both the encoder and the decoder. The format is identified from the file's own bytes, so a Base64 string without a data: prefix is still recognised correctly.
Which Base64 formats can I paste?
Any of them. Standard Base64, the URL-safe alphabet, unpadded Base64, text wrapped at 76 columns, and a full data:image/...;base64,... URI are all accepted. The decoder tells you exactly what went wrong if a string is not valid — including which character and where.
Is this tool free to use?
Yes. Our Base64 tools are completely free. No signup, no watermarks, no limits. Process as many images as you need.
Guides
- How to Encode Images to Base64 (and When to Do It)
Learn how to encode images to Base64. A practical guide to understanding Base64 encoding, when to use it, and the tradeoffs involved.
- How to Reduce Image Size to KB (20 KB, 50 KB, 200 KB)
A form that says "maximum 200 KB" is not asking you to guess at a quality slider. Here is how to hit the number exactly, why "200 KB" means two different things, and what it costs in pixels.
- PNG to AVIF: Measured Sizes, and When AVIF Loses
AVIF is the smallest format the web has, and on the right file it is dramatic — 4.07 MB of PNG became 482 KB. On the wrong file it is larger than what you started with. Here are the measured numbers for both.
More Image tools
- Image ResizerResize images online by pixels, percentage, aspect ratio, or preset. Free, browser-based, batch ready.
- Image Border & PaddingAdd borders, padding, and colored frames to images online. Free, browser-based, instant download.
- Blur ImageBlur faces, license plates, or any part of a photo online free. Adjustable strength, pixelate option.
- Image CropperCrop images online for free. Drag to select, lock aspect ratio, rotate. Instant download.
- Image WatermarkAdd watermark to images for free. Text or logo overlay. Adjustable opacity, position.
- Image Rotate & FlipRotate photos 90°, 180°, 270° or flip horizontally/vertically. Free, browser-based.
- Convert PNG to WebPConvert PNG images to WebP in your browser while keeping transparency. Each file shows its before and after…
- Convert WebP to PNGConvert WebP images back to PNG in your browser. Get a lossless, universally supported file with the…