How to Compress JPG and PNG Images Without Losing Sharpness
You drag the quality slider left, the file size drops to 20 KB, and the photo looks like it was taken through a frosted glass window. Too much compression ruins text, softens faces, and adds weird blocky patches in areas that used to be smooth. This guide explains how to find the sweet spot where the file is small enough but still looks good, and what settings work for different situations: a passport photo for a form, a scanned document, or an image for WhatsApp.
Why compression loses quality and how to control it
JPEG compression works by grouping similar colours together and discarding detail the eye probably won't miss. At high quality (80–100%), the loss is invisible. At medium quality (50–70%), you might notice softer edges on text and slightly less detail in shadows. Below 40%, flat areas start to show blocky artefacts and fine lines break apart. PNG compression is different; it is lossless, meaning it never loses quality, but it produces larger files for photographs. The trick is picking the right format and the right quality number for the job.
Step 1: Decide whether you need JPG or PNG
For photos: JPG is almost always better. You can compress a photo to 40–60% quality and still get a sharp image at a small file size. PNG will keep the photo perfect but at 3–5 times the file size, which defeats the purpose of compressing.
For screenshots, logos, or text‑heavy images: PNG is often worth the extra kilobytes because it keeps text edges razor‑sharp. If you must compress a PNG, reducing the colour depth (from 24‑bit to 8‑bit, for example) can shrink the file without visible loss if the image has few colours.
Step 2: Use a compressor that gives you a quality slider, not a preset
Some tools only offer "low / medium / high" presets with no preview. That is guessing. A good compressor gives you a slider from 0 to 100% and a live preview of the output. Toolzo's image compressor runs in your browser with a quality control and shows you the result before you download. That live feedback is what lets you find the lowest quality that still looks good, rather than downloading and checking five times.
Step 3: Choose the right quality level for your use case
Different situations tolerate different amounts of compression. Here is what works in practice:
- Passport photo for SSC/IBPS form (target 20–50 KB): Crop to 200x230 pixels first, then compress at 40–50% quality. The face stays clear, and the file lands in the right range. The portal's preview will show a recognisable image.
- Scanned document with small text (target 50–100 KB): Stay above 60% quality. At 50% and below, the numbers in a roll code or the fine print of a certificate can become unreadable. Check the output at 100% zoom and read the smallest text before you finalise.
- Photo for WhatsApp sharing (target under 300 KB): 50–70% quality works well. WhatsApp already compresses images further when you send them, so starting with a reasonably compressed file prevents a second layer of loss that can make the image look muddy.
- Image for printing on A4 paper: Do not compress below 80% quality. Print needs more detail than screen viewing. A 300 DPI photo at 80% quality prints well; the same file at 40% will show artefacts on paper.
Watch out: Do not repeatedly compress the same file. Every JPEG save at anything below 100% adds a layer of loss. Keep an uncompressed master copy and always compress a fresh copy of it. If you compress an already compressed photo, the artefacts multiply and the image degrades faster than you expect.
Step 4: Check the output at full size, not just the thumbnail
A thumbnail hides a lot. A photo that looks fine at 2 cm wide on your phone screen might show obvious blocks when viewed at full size. Before you upload the image to a portal or send it to someone, open it and zoom in to at least 100%. Look at the eyes in the photo, the edges of text, and any area with a smooth gradient like a sky or a wall. If those areas look clean, the compression is fine.
FAQ
What quality level is best for compressing a JPEG?
There is no single best number because the content of the image matters. A busy photograph with lots of detail needs higher quality to look good; a simple signature on white paper can be compressed down to 30–40% and still look sharp. The safest starting point is 60–70% and then adjust based on the preview.
Does PNG compression lose quality?
Standard PNG compression is lossless: it reduces file size without discarding any image data. However, if you use a tool that reduces the number of colours (quantisation), that does lose information. For a screenshot or logo with few colours, 8‑bit PNG can be much smaller than 24‑bit PNG with no visible difference. For a photograph, stick to JPG; PNG compression alone won't shrink it enough.
Why does the same quality setting give different file sizes for different images?
JPEG compression efficiency depends on image complexity. A signature with a white background compresses very small at 40% quality. A busy photo with lots of faces and a detailed background will be larger at the same 40% setting. That is normal. The quality slider controls the aggressiveness of compression, not a fixed output size.