JPEG Quality vs File Size Optimizer
Upload an image and re-encode it as JPEG at multiple quality levels in your browser — compare the real file sizes and previews to pick the best quality-to-size trade-off.
Processed entirely in your browser — your image is never uploaded to a server.
About this tool
JPEG compression trades image detail for smaller files, controlled by a quality setting from 0 to 100. The right setting depends on the image and how it will be viewed, and the only way to know for sure is to try several. This optimizer re-encodes your image at five quality levels right in your browser and reports the exact resulting file size for each, alongside a preview you can inspect and download. Because the sizes are measured from your browser's own JPEG encoder rather than estimated, they match what you would actually get when saving. For most web photographs, a quality around 70–85% removes the bulk of the file weight while keeping the image visually indistinguishable from the original at normal viewing sizes.
How to use it
- Click “Choose an image” and select a JPEG, PNG, or WebP from your device.
- The tool re-encodes it at 30%, 50%, 70%, 85%, and 95% JPEG quality.
- Compare the file sizes and savings in the table; click a row to preview that version.
- Download the version that best balances quality and size for your use.
Frequently asked questions
- How does this JPEG optimizer work?
- It loads your image into an HTML canvas and re-encodes it as JPEG at several quality levels (30% to 95%) using your browser's built-in encoder. The file sizes shown are the actual bytes produced, not estimates, so you can see exactly how much each quality level saves before you commit.
- Is my image uploaded anywhere?
- No. All processing happens locally in your browser using the canvas API. The image never leaves your device and is not sent to any server, which makes the tool private and fast even for large photos.
- What JPEG quality should I use?
- For web photos, 70–85% usually gives the best balance — most of the file-size savings with little visible loss. Above 90% the file grows quickly for diminishing visual gain; below 60% compression artifacts (blocking, halos around edges) become noticeable. Compare the previews here to judge your specific image.
- Why is the re-encoded file sometimes larger than the original?
- If your source is already a JPEG saved at high quality (or a highly optimized file), re-encoding at 95% can produce more data than the original, because each JPEG save is lossy and the encoder is not the same one that made the original. The tool flags this as a positive percentage change.
- Does re-saving a JPEG lose quality each time?
- Yes. JPEG is lossy, so every save discards some detail — repeatedly opening and re-saving a JPEG (generation loss) degrades it. Always optimize from the highest-quality original you have, not from an already-compressed copy.
- What about PNG, WebP, or AVIF?
- This tool outputs JPEG, which is ideal for photographs. For graphics, screenshots, or transparency, PNG is better; for the smallest web files at similar quality, WebP and AVIF beat JPEG but need modern browser support. Use the Image File Size Estimator to compare formats before encoding.
Related tools
- Image File Size Estimator — estimate size by format and quality before encoding.
- Video File Size Calculator — bitrate, duration, and size for video.