Compress JPEG Files Free — How the Quality Slider Actually Works
JPEG compression is lossy. That's not a flaw — it's the whole point. The format was designed in the early 1990s specifically to store photographs at a fraction of their raw size by discarding image data the human eye can't detect at normal viewing distances. Understanding how that works makes it a lot easier to choose the right quality setting instead of guessing.
DCT compression and the quality factor
The JPEG encoding process breaks your image into 8×8 pixel blocks and applies a Discrete Cosine Transform (DCT) to each one. The DCT converts pixel data into frequency components — essentially describing the block as a sum of waves at different frequencies. High-frequency components represent fine detail and sharp edges. Low-frequency components represent gradual tonal changes like smooth skin or sky gradients.
The quality factor controls a quantization table that determines how aggressively high-frequency data gets discarded. At quality 95, very little is thrown away and the file stays large. At quality 75, most imperceptible high-frequency detail is removed and the file shrinks dramatically. At quality 50, visible blocking artifacts start to appear in areas with detail. The tool defaults to 75% because that's where the size-to-quality ratio is best for most photographs — you'll typically see a 60–75% file size reduction with no perceptible difference on a monitor.
Why re-compressing a JPEG loses quality — and when that's fine
Each time you save a JPEG, you're applying that quantization process again on top of whatever quantization already happened. Compressing a JPEG once from a high-quality original (shot in RAW or saved at 95%+) at 75% gives excellent results. Compressing a JPEG that was already saved at 70% will stack quantization artifacts and produce visible degradation faster. If you're working from a camera original or a design export at 90%+, you can compress freely. If your source file was already compressed heavily, start at a higher quality setting — 80–85% — to limit cumulative damage.
For web use, this almost never matters in practice. A blog photo, product image, or profile picture compressed from a decent camera file at 75% quality will look indistinguishable from the original on any screen. The quality differences only become obvious when you're zooming in to pixel level or printing large format.
The automatic fallback that prevents bad outputs
The compressor includes logic that steps down through lower quality levels — 65%, 50%, 35%, 20% — until it finds a setting that produces a file smaller than your input. If even 20% quality produces a larger file (which can happen with very small images or already-optimized JPEGs), the tool returns your original unchanged. You'll never get back a file that's larger than what you uploaded.
Files are never sent to any server. The whole process runs in your browser using the HTML5 Canvas API. The JPEG encoding is done by your browser's native image codec — the same one Chrome or Safari uses to display images — so the output is a standard JPEG that works everywhere. For converting PNG files to JPEG, see our PNG to JPG converter. For adjusting dimensions rather than quality, the image resizer handles that separately. If you need control over multiple formats from a single tool, the general image compressor handles JPG, PNG, and WebP together.
Practical targets: what file size should you aim for?
There's no universal answer, but here are useful reference points. A full-width hero image for a website should stay under 200KB. A blog post inline image works well at 80–150KB. A product thumbnail at 400×400px should be 20–50KB. An email attachment photo ideally sits below 500KB to avoid triggering size limits in Gmail and Outlook. A profile picture for most platforms can go down to 50KB without any visible quality loss at the sizes they display it. Start at 75% quality, check the output size shown on the card, and adjust down if you need to go further.
If you need to hit a specific kilobyte ceiling rather than a quality level — for a government portal, a job application form, or a platform with a hard upload limit — the compress to 20KB tool targets a precise byte count using an iterative quality search. For compressing other formats, PNG compression uses color quantization to reduce file size while maintaining lossless encoding. For adjusting pixel dimensions at the same time you compress, the image resizer handles both in one step by scaling before encoding.