Image Compressor
Compress images to specific file sizes. Reduce to 100KB, 50KB, 20KB or any target. Output JPEG or WebP. Free, no upload to server.
Use Image Compressor
Click to upload an image
PNG, JPG, WebP supported
How browser image compression works
Everything here happens on a hidden HTML <canvas>. Your image is drawn onto the canvas, optionally at smaller dimensions, and then read back with toDataURL() at a chosen quality level. The browser's built-in JPEG or WebP encoder does the heavy lifting, so there is no upload, no server, and no file-size limit beyond your device's memory. Because the encoder is lossy, the tool runs a short loop: it encodes, measures the result, and if it is still above your target it lowers the quality a notch and tries again — up to ten passes. When quality alone can't reach the target, it also scales the pixel dimensions down, which is far more effective for very small targets than quality reduction on its own.
Hitting exact file-size targets (100KB / 50KB / 20KB)
Strict upload caps are everywhere: passport and visa portals often demand under 100KB, exam and job-application sites frequently want 50KB or even 20KB, and email clients balk at large attachments. Pick the matching preset and the compressor iterates until the output sits at or under that ceiling. A few practical tips: aim a little below the limit to leave headroom for the platform's own re-encoding; switch the output to WebP if the platform accepts it, since you can hold more visual quality at the same byte budget; and if a 20KB target leaves a photo looking muddy, crop tightly first so every remaining pixel counts. The before/after dimensions shown above tell you exactly how much downscaling was needed to land on size.
JPEG vs WebP vs PNG: which to pick
JPEG is the universal choice for photographs — lossy, no transparency, and readable by virtually everything. WebP typically produces files 25–35% smaller than JPEG at equivalent quality and supports both lossy and lossless modes plus transparency; every current browser supports it, so it is the best default for the web. PNG is lossless and the right call for logos, screenshots, line art, and anything needing crisp edges or an alpha channel — but it is a poor fit for photos, where it produces huge files. Rule of thumb: photos to WebP (or JPEG for compatibility), graphics and transparency to PNG (or lossless WebP). This tool outputs JPEG or WebP; for lossless graphics, keep the original PNG.
Frequently Asked Questions
Find this useful?
These tools are free and ad-free. Support the project!