20 KB is very small: roughly a thumbnail, a signature scan or an avatar. This page sets a 20 KB target and compresses in two stages, lowering JPEG quality first and then shrinking the pixel size. A large photo usually has to become small in pixels to fit, so expect a noticeably reduced picture, and the tool says plainly if it cannot get under 20 KB.
Runs in your browser
Free, no sign-up. Decoding, resizing and re-encoding happen in your browser on a canvas. The images are not uploaded; the tool only records anonymous actions such as 'compress' or 'download', never file names or sizes.
Upload images above to start compressing
The tool picks the highest quality that fits, and only shrinks the pixel size if the lowest quality is still too big. The Quality slider is not used.
Sample data
A generated 3000 x 2000 test photo (JPEG, 2,386,343 bytes), target 20 KB.
19,491 bytes (under the 20 KB target), 755 x 503 px JPEG.
Measured in this tool on a generated, deliberately noisy test photo, which is harder to compress than most real pictures. Your final size and dimensions will differ.
Here 1 KB is counted as 1,000 bytes. Your computer may show sizes in 1,024-byte units, which reads about 2% smaller, so leave a little room if a form is strict.
The browser decodes each image onto a canvas at the target size and encodes it again in the format you chose. Smaller pixel dimensions and a lower quality value both reduce the file size; resizing usually saves far more than quality alone.
Quality applies to JPEG and WebP output. PNG is lossless, so the quality slider does not change a PNG: to shrink a PNG, reduce its dimensions or switch the output to WebP or JPEG.
saved % = (original size - compressed size) / original size x 100
JPEG suits photographs. WebP is usually smaller than JPEG at similar quality and supports transparency, but very old software may not open it. PNG suits screenshots, logos and anything that needs exact pixels or transparency.
Because the image is redrawn on a canvas, transparent areas become black if you save as JPEG, which has no transparency. Pick PNG or WebP to keep transparency.
Re-encoding keeps only pixel data. Camera EXIF data such as GPS location, device model and timestamps is not carried over, which is useful before publishing a photo but means you cannot recover it from the compressed copy.
Animated GIFs lose their animation: only the first frame is processed. SVG files are rejected on purpose because they can contain scripts.
The tool does not keep the original when the new file is larger. An already well-optimised JPEG saved at 100% quality, or a WebP converted to PNG, can grow. If Saved shows no gain, lower the quality, reduce the dimensions or keep your original.
Almost any photo can if its pixel dimensions are allowed to shrink enough, but the image gets small. The tool stops at a minimum size and reports that the target was not reached rather than returning something unusable.
The search keeps the best quality that still fits, so it lands at or below the limit. Quality steps are coarse, so it will not hit the number exactly.
Quality drops first, down to a floor where artifacts become obvious. After that the picture is scaled down and the search repeats.
No. It is decoded and re-encoded by your browser, and the file never leaves your device.
We build calculators, converters and processing steps like this one directly into your web or mobile product, with your rules and branding.