Type a size such as 50 KB, 100 KB or 2 MB and the tool finds the highest JPEG or WebP quality that still fits under it — on your device, with nothing uploaded.
Compress Image to a Target Size
Type a size such as 50 KB, 100 KB or 2 MB and the tool finds the highest JPEG or WebP quality that still fits under it — on your device, with nothing uploaded.
Every attempt is encoded in your browser. Your photos, which often include identity documents, are never uploaded, and the result carries no EXIF or location data.
Upload forms, job portals and exam sites publish a hard ceiling — 20 KB for a signature, 50 KB for a photo, 200 KB for a scan — and reject a file that is even a few bytes over. There is no formula from a byte limit to a quality setting, because the same slider position gives very different sizes for different pictures. So this tool searches: it encodes the photo, measures the result and narrows the quality range until it finds the highest quality that still fits. If even the lowest quality is too large, it shrinks the picture as well, but never below a minimum share of the original size that you control. Every result shows its size, quality and scale, and a photo that is already under the limit is re-saved without growing.
Features
Presets for 20 KB, 50 KB, 100 KB, 200 KB, 500 KB, 1 MB and 2 MB, plus any custom value in KB or MB
Searches for the highest quality that fits instead of guessing at a setting
Shrinks the picture too when quality alone cannot reach the target, within a minimum size you set
Optional longest-side limit applied before the search starts
Saves as JPEG, or WebP where the browser can write it
Live progress shows the quality and size of each attempt, with Cancel between attempts
Before and after previews with the exact size, quality and scale for every photo
Works through many photos in turn and packs the results into one ZIP
How to use the Compress Image to Size
Drop, choose or paste your photos
Pick a target size, or type your own and choose KB or MB
Watch the search narrow in on the quality that fits
Check the size, quality and scale on each card, then download one photo or the ZIP
Example
Input
passport.jpg — 2.4 MB
Target: 50 KB · save as JPEG
Quality alone could not reach 50 KB, so the picture was also scaled to 82 % of its original size.
Common errors & troubleshooting
It says it could not reach the target. — The limit is below what the picture can reach at the minimum size you allow. Lower the Never below percentage, resize the photo smaller first, or raise the target.
The photo looks blurry or blocky. — A very small target forces a low quality or a small picture. Choose the largest limit the form allows; a 20 KB file is a thumbnail-sized image.
A PNG's transparent background turned white. — PNG is converted to JPEG, which cannot be transparent, so see-through areas are filled with white. Choose WebP if the form accepts it.
The form still rejects a file that is under the limit. — Some forms count a kilobyte as 1,000 bytes and others as 1,024. Aim a little below the limit, and check whether the form also fixes the pixel dimensions.
Frequently asked questions
How does Compress Image to Size find the quality that fits my limit?
It encodes the photo at a high quality, measures the file, and narrows the quality range from both sides until the result lands just under your target. If even the lowest quality is too big, it reduces the picture size and searches again.
Why is my PNG converted to JPEG when I compress it to a size?
PNG is lossless, so lowering a quality setting does not shrink it — only fewer pixels would. JPEG and WebP trade tiny losses of detail for a much smaller file, which is what a byte target needs. Transparent areas turn white in a JPEG.
What happens if the target size is too small for my image?
The tool tries the lowest quality, then shrinks the picture down to the minimum share you allow. If it still cannot fit, it says so and offers the smallest result it made. Lower the minimum, raise the limit or resize the photo first.
Should I choose JPEG or WebP for the compressed image?
JPEG is accepted by virtually every upload form and viewer. WebP usually reaches the same quality at a smaller size and can keep transparency, but some portals refuse it. Use JPEG unless you know WebP is allowed.
Does compressing a photo here keep its EXIF and location data?
No. The photo is drawn and saved again, which drops EXIF metadata such as camera model, capture time and GPS position. The picture itself is kept as closely as the target allows.
What file sizes do government, exam and job forms usually ask for?
It varies, so read the form's instructions. Signatures are often limited to around 20 KB, passport-style photos to about 50 KB, and scanned documents to 100 to 500 KB or a couple of megabytes. Set the pixel size first if the form requires one.
Related tools
Image Resizer — Resize photos by pixels, percentage, preset or longest side — in batches, with a ZIP download.
Image Optimizer — Re-encode and shrink images (JPEG/WebP/PNG), optionally resizing.
Image Format Converter — Convert images between PNG, JPEG and WebP entirely in your browser.
Compress PDF to Size — Bring a PDF under an exact byte target such as 100 KB, 200 KB or 2 MB.
Passport Photo Maker — Crop a photo to passport and ID sizes and lay out a print-ready sheet of copies.
Base64 Image Encoder / Decoder — Convert images to Base64 Data URIs with ready-made HTML and CSS snippets, or decode a Data URI back to a downloadable image.
EXIF Viewer & Remover — View and strip EXIF metadata (including GPS) from photos — nothing is uploaded.
More Images tools
Image Optimizer — Re-encode and shrink images (JPEG/WebP/PNG), optionally resizing.
Image Format Converter — Convert images between PNG, JPEG and WebP entirely in your browser.
EXIF Viewer & Remover — View and strip EXIF metadata (including GPS) from photos — nothing is uploaded.
Base64 Image Encoder / Decoder — Convert images to Base64 Data URIs with ready-made HTML and CSS snippets, or decode a Data URI back to a downloadable image.
App Icon Generator — Turn one image into every iOS, macOS and Android app icon size — downloaded as a ZIP, in your browser.