Compressing to a target size
Job portals, exam and government forms often accept photos only under a limit such as 20 KB, 50 KB or 100 KB. Choose Target size, enter the limit, and the tool encodes the image several times to find the highest quality that fits. If even quality 40 is too big, it makes the image smaller, keeping its proportions, rather than ruining it with very low quality; turn off Make the image smaller if needed if the form requires exact dimensions.
Sizes are counted in decimal units (1 KB = 1,000 bytes). A file under 100,000 bytes is under 100 KB whichever way the form counts, since 100 KiB is 102,400 bytes.
How to use the Image Compressor
- Choose, drop or paste one or more images, or press Sample.
- Choose Quality and move the slider, or Target size and enter a size such as 100 KB.
- Optionally pick an output format.
- Compare the result with the original, then download it, or download all as a ZIP.
Examples
A photo to under 100 KB
sample-photo.jpg: 1600 × 1067 JPEG, 354,481 bytes. Target size 100 KB, same format.JPEG, 1600 × 1067, quality 75, 97,545 bytesQuality alone was enough: the highest quality under 100,000 bytes is 75, and the image keeps its size.
Under 20 KB, resizing allowed
The same photo. Target size 20 KB.JPEG, 1290 × 860, quality 45, 19,146 bytesAt quality 40 the full-size photo is still over 20 KB, so the tool scales it down until a reasonable quality fits.
Under 20 KB at the original size
The same photo. Target size 20 KB, with “Make the image smaller if needed” turned off.JPEG, 1600 × 1067, quality 27, 19,248 bytesUse this when a form requires exact dimensions; expect visible blockiness at such low quality.
AVIF at quality 50
The same photo. Quality 50, format AVIF.AVIF, 1600 × 1067, quality 50, 12,065 bytesA twelfth of the JPEG's size. AVIF suits websites; many upload forms still accept only JPEG or PNG.
Which format to choose
JPEG works everywhere and suits photos. WebP and AVIF are usually smaller at the same visible quality and are supported by all current browsers; AVIF is often half the size of JPEG but slower to encode. PNG is lossless, for screenshots, logos and images with transparency: it's optimised with OxiPNG without changing a pixel, so the savings are smaller.
- Photos for an upload form: JPEG, by target size.
- Photos for your own website: WebP or AVIF, quality 60–75.
- Screenshots and graphics with sharp edges or transparency: PNG or lossless WebP.
Metadata and orientation
Compressed images don't keep the original's metadata: camera details, dates and GPS location are removed, which also saves space. Photos taken sideways are turned the right way up first, so they look the same as before.
Options
- Quality
- 1–100 for JPEG, WebP and AVIF. Lower is smaller with more visible artefacts. Ignored for PNG and lossless output.
- Target size
- The largest file size you need, in KB or MB. The tool finds the highest quality that fits, between 40 and 90.
- Make the image smaller if needed
- When quality 40 still doesn't fit, scale the image down instead of lowering quality further. Off: keep the dimensions and go as low as quality 1.
- Format
- Same as original, JPEG, PNG, WebP, lossless WebP or AVIF. GIF, BMP and ICO images are written as PNG when kept. Transparent areas become white in JPEG.
Limitations
- Images up to 50 megapixels; phones may run out of memory sooner.
- Animated GIF and WebP images keep only their first frame.
- HEIC (iPhone) photos open only in Safari.
- PNG output is lossless, so a target size is reached only by resizing.
- Metadata (EXIF, GPS, colour profiles) isn't kept; images are converted to sRGB.
Frequently asked questions
Are my images uploaded?
No. They're decoded, compressed and encoded in your browser with WebAssembly encoders. Nothing leaves your device, and the tool works offline once the page has loaded.
How do I compress an image to exactly 100 KB?
Choose Target size and press 100 KB. The tool gives you the best-quality image at or under 100 KB; an exact byte count isn't possible with compression, and smaller is what upload limits require.
Why is my compressed PNG bigger, or barely smaller?
PNG is lossless, and many PNGs are already well optimised. For photos, convert to JPEG or WebP; for graphics, try lossless WebP, which is usually about a quarter smaller than PNG.
Does compressing reduce the image's dimensions?
Not in Quality mode. In Target size mode, only when the target can't be met at quality 40 or above, and you can turn that off.
Is 1 KB 1,000 or 1,024 bytes here?
1,000 bytes. A result under 100 KB (100,000 bytes) is also under 100 KiB (102,400 bytes), so it passes either check.