Image Compressor — Shrink JPG & PNG to Any Size
Drop your images and compress them to a target size like 100KB or a chosen quality level — processed entirely inside your browser, nothing is uploaded.
Image Compressor
About the Image Compressor
Oversized images are the number-one reason websites load slowly, email attachments bounce, and forms reject your uploads. Pakistani portals are especially strict: Nadra applications, scholarship forms, job portals and university admission systems routinely cap photos at 100KB, 200KB or 500KB — and most mobile photos are 2 to 5 MB. This image compressor closes that gap in seconds.
Unlike most online compressors, this one never uploads your files. Everything happens inside your browser using Canvas processing: your photo is resized and re-encoded locally on your own device, and only the compressed copy is saved back to your phone or computer. Passport photos, CNIC scans, academic documents and personal pictures stay completely private — there is no server to send them to, and no storage copy anywhere.
Two compression modes cover every need. Target-size mode hunts for the exact quality level that brings your image under a limit you set — 100KB, 200KB, whatever the form demands. Quality mode gives you a simple slider from light touch-up to aggressive shrink. Both modes keep the image dimensions unchanged unless the target is impossible at full size, in which case the tool automatically steps the resolution down to meet your target.
How to Use the Image Compressor
Follow these simple steps — the whole process takes under a minute:
- Click the drop zone or drag images in — JPG and PNG files work; multiple files are fine.
- Choose a mode — 'Target size' to hit a KB limit (type 100 for the classic 100KB upload cap), or 'Quality' to set a fixed level from the slider.
- Compression starts automatically — each file appears in the list with its original size, compressed size and percentage saved.
- Preview the thumbnail to confirm the image still looks good — try a higher target size if quality has dropped too far.
- Press Download on each file you want — or Download All to save every compressed image at once.
The Formula & Method Behind the Image Compressor
JPEG compression is lossy: the encoder divides the image into 8×8 pixel blocks, transforms each block into frequency data (the Discrete Cosine Transform), and then throws away the high-frequency detail your eye least notices. The 'quality' number (5–100) controls how aggressively that detail is discarded — quality 90 keeps almost everything, while quality 30 produces small files with visible softness. File size falls roughly exponentially as quality drops, which is why targeting an exact KB limit needs a search rather than one fixed setting.
Target-size mode uses binary search: it compresses at quality 50, checks the result, then halves the quality range again and again — typically 6 to 8 attempts — until it finds the highest quality that still fits under your limit. If even quality 5 exceeds the target (rare, but possible with very detailed images), the tool reduces the resolution by 25% and searches again, repeating until the target is met. This is the same idea professionals use in Photoshop's 'Export As' size preview, automated.
PNG files get the same treatment by converting to JPEG, because PNG is a lossless format that cannot shrink photo-like images much. The practical trade-off: fully transparent backgrounds become white, and the file gains the wide compatibility of JPEG. For photographs and document scans — which is what upload forms ask for — JPEG output is always the right choice; PNG remains better for logos and screenshots with flat colours, which the tool still accepts and compresses pragmatically.
When to Use Which Mode (and Other Practical Tips)
Uploading to a government or university portal? Use Target size and set it 5–10% under the cap — if the form says 100KB, aim for 90KB, because some portals measure slightly differently and a rejected upload costs you a whole re-upload cycle.
Optimising images for your own website? Use Quality mode at 70–80. That range is the sweet spot where JPEG looks identical to the original on screens but weighs 3–10× less, directly improving your page speed and Core Web Vitals — which Google rewards with better rankings.
Email and WhatsApp: WhatsApp already re-compresses photos aggressively, but for email attachments under provider limits (usually 25MB total), target-size compression of 200–500KB per image keeps you safe while keeping quality high.
Keep your originals. Compression is one-way — always compress a copy and keep the master file untouched. If a form suddenly asks for higher quality than you expected, you can re-compress from the original instead of living with an over-shrunk image. Re-compressing an already compressed file degrades it twice; compressing from the original only once.
Frequently Asked Questions
Quick answers about the Image Compressor — for anything else, message us on WhatsApp.
How do I compress a JPG to exactly 100KB?
Add your image above, choose Target size, type 100 in the KB field, and the tool automatically finds the best quality level that fits under 100KB — then press Download. It is the fastest way to meet strict upload limits on Pakistani portals.
Are my photos uploaded to a server?
No. This compressor works entirely inside your browser using Canvas processing. Your images never leave your device — nothing is uploaded, stored or transmitted, which makes it safe for CNIC scans, passport photos and personal documents.
Why did my PNG turn into a JPG?
PNG is a lossless format that cannot shrink photos much, so the tool converts PNG images to high-quality JPEG, which compresses far better. Transparent areas become white in the process. For logos and flat graphics, PNG stays ideal — for photos and scans, JPEG is standard.
What quality setting should I use for websites?
70–80 is the sweet spot: visually indistinguishable from the original at normal viewing sizes while cutting file size by 60–85%. Smaller images load faster, improve Core Web Vitals, and help your Google rankings.
Can I compress multiple images at once?
Yes — drag several files into the drop zone or select them together. Each is compressed independently and listed with its own before/after sizes, and Download All saves every compressed file in one go.
Why is my compressed image still over the target size?
Very detailed or large photos may need resolution reduction to hit tiny targets like 50KB. The tool automatically steps resolution down (in 25% cuts) until the target is met. If a file still misses, try a slightly higher target — most forms accept up to 500KB.
Related Free Tools
More handy tools from the DigitalKasur collection — all free, all browser-based.
Need a Website, SEO or Event Management in Kasur?
DigitalKasur builds fast, affordable websites and runs SEO, social media and complete event management across Kasur District — Kasur city, Pattoki, Chunian, Kot Radha Kishan, Theng More and Phool Nagar. Get a free consultation today.