JPG Batch Quality Converter
Batch convert and compress multiple JPG images to any quality level directly in your browser. No upload, no server, instant download.
About
JPEG compression operates on a lossy Q factor ranging from 1 (maximum compression, severe artifact introduction) to 100 (near-lossless, minimal size reduction). Selecting an inappropriate quality level risks either bloated file sizes that slow page loads and consume storage, or visible blockiness from aggressive quantization of DCT coefficients. This tool re-encodes every pixel through the browser's native JPEG codec at your specified Q, producing real output files with accurate byte counts. No server upload occurs. All processing runs locally via the Canvas API.
The default value of 85 typically yields a 40 - 60% size reduction with negligible perceptual loss for photographic content. Below 50, chroma subsampling artifacts become visible on sharp edges and text overlays. This tool approximates ImageMagick's -quality flag behavior, but quantization tables differ slightly between browser engines (Chromium vs. Firefox). Pro tip: process a single test image first and inspect the preview before committing to a full batch.
Formulas
The JPEG encoder applies Discrete Cosine Transform to each 8×8 pixel block, then quantizes coefficients using a quality-dependent quantization matrix. The effective compression ratio relates to quality as follows:
where R = compression ratio (as fraction saved), Sout = output file size in bytes, Sin = input file size in bytes.
The browser's Canvas API encodes via:
where Q = user-specified quality (1 - 100), divided by 100 to produce the 0.0 - 1.0 float the API expects. The quantization step size for each DCT coefficient k is approximately:
where Tk = base quantization table value, S = scale factor derived from Q. When Q < 50, S = 5000Q. When Q ≥ 50, S = 200 − 2Q.
Reference Data
| Quality Level | Typical Compression Ratio | File Size (per 12MP photo) | Perceptual Quality | Best Use Case |
|---|---|---|---|---|
| 100 | 2:1 | ~5.5 MB | Indistinguishable from source | Archival, medical imaging |
| 95 | 4:1 | ~3.0 MB | Excellent | Print production, photography portfolio |
| 90 | 6:1 | ~2.0 MB | Very good | High-quality web images |
| 85 | 8:1 | ~1.5 MB | Good (default sweet spot) | General web use, CMS uploads |
| 80 | 10:1 | ~1.2 MB | Good, minor softness | E-commerce product images |
| 75 | 12:1 | ~1.0 MB | Acceptable | Blog posts, social media |
| 70 | 15:1 | ~800 KB | Noticeable softening | Email attachments, thumbnails |
| 60 | 20:1 | ~600 KB | Visible artifacts on edges | Low-bandwidth applications |
| 50 | 25:1 | ~480 KB | Obvious blocking | Preview/draft quality |
| 40 | 30:1 | ~400 KB | Severe artifacts | Placeholder images |
| 30 | 40:1 | ~300 KB | Heavy degradation | Bandwidth-critical mobile |
| 20 | 55:1 | ~220 KB | Barely recognizable detail | Extreme compression tests |
| 10 | 80:1 | ~150 KB | Abstract/mosaic appearance | Artistic effect, watermarks |
| 1 | 100+:1 | ~80 KB | Unrecognizable | Minimum viable data |