Image Converter
Converts ComfyUI and A1111 images between WebP, AVIF, JPEG XL, JPEG and PNG (EXR in too), keeping the workflow, prompt and generation parameters. Everything runs locally in your browser. Nothing is uploaded.
Images to convert
#fffffffills transparent areas (JPEG has no transparency)For images converted or edited with another tool that dropped the workflow or parameters. Files to fix are matched to originals by name (image.png → image.webp); pick an original yourself where there's no match. Only the metadata is written. The image itself is not re-encoded.
Originals
PNG, WebP, JPG, AVIF, JPEG XL or EXR
Files to fix
Measures how close compressed versions are to the original (SSIM, PSNR, worst pixel error), how big they are and how long they take to encode. Generate them with the encoders the Convert tab uses, or add files made elsewhere. Transparency is compared too.
Original
a lossless source (PNG) is best
Compressed versions
Summary
How to read the scores
↑ means higher is better, ↓ means lower is better. Every score compares a compressed file with the original.
- Quality
- A plain-language grade based on SSIM. Rules of thumb, not guarantees: noisy photos hide artifacts, while flat graphics and text show them sooner.
- SSIM ↑ (0 to 1)
- How similar the image looks: edges, textures and contrast. It is the closest of these scores to human judgement. 1.000 = identical. Above 0.99 is usually indistinguishable, and below 0.90 the damage is obvious.
- PSNR ↑ (decibels)
- How accurate the pixel values are. Above 40 dB is excellent, 35–40 good, 30–35 noticeable on close inspection, and below 30 visibly degraded. Every +6 dB roughly halves the average pixel error. ∞ means the pixels are exactly identical (lossless).
- Size ↓ / Saved ↑
- The file size, and how much smaller it is than your original file. 90% saved means the file is one tenth of the original's size. Generated files hold only the image: Convert adds the workflow or parameters on top.
- BPP ↓ (bits per pixel)
- File size divided by the number of pixels, so you can compare images of different resolutions. An uncompressed image is 24 BPP (32 with transparency). Typical web photos are 0.5–2.
- MSE ↓
- The average squared difference per pixel. It is the raw number PSNR is calculated from. 0 = identical. You can mostly ignore it and read PSNR instead.
- Max err ↓ (0 to 255)
- The single worst pixel difference. Lossy formats nearly always have some large errors, so this matters mainly for pixel art, UI or text, where any changed pixel counts. 0 means lossless.
- Transparency
- For images with transparency, the colour scores above compare both images laid over black and over white, and keep the worse result. That way a change in transparency counts as much as it shows, and colour hidden in fully transparent areas doesn't count. Alpha PSNR and Alpha max err score the transparency channel on its own. JPEG has no transparency, so it fills transparent areas with the Convert tab's background colour and scores accordingly.
- Encode time ↓
- How long the encoder took for this image. Several encodes run at once, so compare times within one run rather than across machines.
- Charts
- Each line is a format at different quality settings. Up and to the left is better: higher quality for fewer bytes. The line that sits higher is the more efficient format.
Results
| File | Format | Quality | Setting | Size ↓ | Saved ↑ | BPP ↓ | SSIM ↑ | PSNR ↑ | MSE ↓ | Max err ↓ |
Alpha PSNR ↑ |
Alpha max err ↓ |
Encode time ↓ |
|---|
Rate–distortion
Visual comparison
How it works
- Encoders: libwebp (WebP), libavif (AVIF), libjxl (JPEG XL), MozJPEG (JPEG) and oxipng (PNG), compiled to WebAssembly by the jSquash project and loaded from jsDelivr the first time each one is used, so that step needs an internet connection. Lossless output is pixel-identical to the source image. JPEG XL inputs are decoded with libjxl too, since most browsers can't.
- Resize: Lanczos-3 resampling with premultiplied alpha, done before encoding. With a resize, lossless output matches the resized image, not the source.
- WebP → WebP: the source's EXIF (workflow/parameters), XMP and colour profile are copied over unchanged. Animated WebPs aren't supported.
- WebP, AVIF, JPEG XL and JPEG metadata: written as EXIF in the layout each app uses (JPEG XL in an
Exifbox of the JXL container). ComfyUI: IFD0Model=prompt:{…},Make=workflow:{…}, and any other keys in the tags below those. A1111 / Forge:UserComment(UNICODE) = theparameterstext. JPEG can hold at most 64 KB of EXIF. - PNG metadata: one text chunk per key (
prompt,workflow,parameters), as ComfyUI and A1111 save PNGs. - Metadata sources: PNG text chunks, the EXIF in JPG, AVIF and JPEG XL files (as A1111 and ComfyUI write them), and the string attributes of EXR headers.
- EXR: decoded with three.js's EXRLoader (also loaded from jsDelivr), then converted from linear light to 8-bit sRGB. Values brighter than white are clipped, and "lossless" means lossless from that 8-bit result.
- PNG colour profiles (iCCP/gAMA) are not carried over. ComfyUI and A1111 output plain sRGB, so this doesn't matter for their images.
- Benchmark: generated versions go through the same encoders and options as Convert (effort, Sharp YUV and JPEG background from the Convert tab), without the metadata. PNG, WebP, AVIF and JPEG XL are decoded exactly (built-in PNG decoder, jSquash for the rest), not through the browser's canvas, which rounds the colour of semi-transparent pixels. Images with transparency are compared over black and over white, and the worse score counts.