Compress Image to 1 MB
A 1 MB cap is common for email attachments and upload forms. The target is already set: drop your photo and keep nearly all of its resolution.
Click to choose images, drag and drop them here, or paste with Ctrl+V
JPG, PNG, WebP. Select more than one to compress in bulk. Stays on your device, nothing is uploaded.
Your compressed image will appear here once generated.
For JPEG/WebP, it binary-searches quality at your image's original size. If "Allow resizing" is off and quality alone can't hit the target, you'll get the smallest size possible without changing dimensions. PNG is lossless, so hitting a small target needs resizing turned on. JPEG or WebP will get you much closer to a small target at full size.
Fitting a photo into 1 MB
A modern phone photo is typically 3 to 8 MB. Bringing it under 1 MB rarely needs any resizing: a 12-megapixel image usually fits at a JPEG quality where the difference from the original is hard to see without zooming in.
1 MB is the size to aim for when you are emailing several photos, uploading to a form with a per-file limit, or attaching images to a support ticket. Select all your photos at once to compress them to the same limit and download a single zip.
If the result still shows visible artefacts, the image probably has a lot of fine detail such as foliage or fabric. Turning on Allow resizing lets the tool trade a little resolution for cleaner detail, which usually looks better than heavy compression at full size.
How it works
The quality search for JPEG and WebP runs eight rounds of binary search over the encoder's quality parameter: encode at 0.5, compare the byte count against your target, then halve the interval up or down and encode again. Eight rounds pin the quality value down to within about 0.4% of its full range, which is why results usually land just under your target rather than far below it. With resizing enabled, that same search repeats at progressively smaller dimensions, shrinking 15% per step, until it finds a scale where quality alone can close the remaining gap.
PNG needs a completely different lever, because the browser's canvas encoder only
writes full truecolor files and has no quality knob at all. So this page ships its own
indexed-color PNG encoder: a median-cut quantizer builds a palette of 128 down to 8
representative colors, Floyd-Steinberg dithering diffuses the rounding error so
gradients don't turn into visible bands, and the palette indices are compressed with
the browser's native CompressionStream and written byte by byte into a
valid color-type-3 PNG, one byte per pixel instead of three or four. That's the same
technique pngquant and TinyPNG use, and on screenshots and flat graphics it routinely
cuts 60-80% without resizing. It requires a fully opaque image, since indexed PNG can't
store per-pixel transparency.
A practical shortcut before you reach for resizing: at equal visual quality, WebP files come out roughly a quarter to a third smaller than JPEG, so an image JPEG can't squeeze under your target at full resolution often fits once you switch the output format to WebP.
All of this runs against an in-memory canvas in this tab. You can verify it: open DevTools, switch to the Network tab, and compress something. No request ever carries your image, in either direction, and the tool keeps working with Wi-Fi switched off.
Common questions
Why can't it always hit my exact target size?
For JPEG and WebP the tool binary-searches the quality setting at your image's original dimensions. If even the lowest quality is still bigger than your target, you get the smallest file possible without changing the width and height. Turn on "Allow resizing" to let it shrink dimensions too, which reaches much smaller targets.
Which image formats are supported?
You can drop in JPG, PNG, or WebP files and export as JPEG, WebP, or PNG. JPEG and WebP give the best size control because their quality setting is adjustable. PNG is lossless, so its size varies and small targets usually need resizing turned on.
Is my image uploaded anywhere?
No. Compression happens entirely in your browser using the canvas API, so your images never leave your device. That also means there's no server-side file size cap or upload queue.
Can I compress several images at once?
Yes. Select or drag in multiple files, set one target size, and hit "Compress all". You can download the results one by one or grab everything as a single .zip.
From the blog: How to Compress Images Without Losing Quality