Target Size Compression
Compress image to a specific KB size
You know the portal that wants a photo under 100 KB and keeps rejecting yours? Type the KB limit, drop your photos, and get files that land at or under that size. No quality slider guesswork.
Drop images here or click to upload
JPG, PNG, WebP, HEIC — up to 50MB each
Output lands at or under your target. JPEG and WebP only.
- Files never leave your device
- Runs in your browser
- Free, no signup
How it works
- 1
Set your target
Type the KB limit you need to stay under. Common values are 100, 200, 500, and 1000. The tool accepts any positive number.
- 2
Drop your images
Upload JPEG or WebP files. Multiple files are all compressed to the same KB target in one batch. Drop as many as you need.
- 3
Download
Each file is automatically compressed to just under your KB limit. Download individually or as a ZIP. No guessing at quality settings required.
Why target-size compression beats manual quality adjustment
Automatic binary search
The tool adjusts quality in a fast series of attempts, narrowing in until the output lands at or just under your target. No manual slider needed.
Form and portal ready
Built for the real-world limits on government portals, job application systems, and document upload forms that reject files over 100 KB, 200 KB, or 1 MB.
Still completely private
The binary search loop runs entirely inside your browser. Your documents and photos never leave your device at any point in the process.
Where this helps
Government and visa application forms
Official portals specify exact photo size limits, typically 50 KB, 100 KB, or 200 KB. Uploading a file that exceeds the limit causes an error. This tool hits the target on the first try without repeated attempts.
Job application portals
Recruitment platforms and HR systems set strict document upload caps. A resume photo or scanned certificate that comes in under the limit gets accepted without error messages or manual retries.
Banking and KYC document uploads
Know Your Customer verification systems at banks and payment platforms frequently cap uploads at 1 MB. Compress identity documents to the required limit while keeping them fully readable.
School and university admissions
Admission portals commonly require photos under 50 KB or 100 KB. Target-size compression hits that limit automatically without the repeated manual guessing that wastes time.
Tips that help
- 1
Know your exact target before starting
Check the upload page for precise size requirements before you compress. Some portals list limits in MB, others in KB. Convert as needed before typing your target so you do not overshoot.
- 2
Targets under 50 KB may show visible quality loss
Compressing a large photograph to 50 KB requires a significant quality reduction. The image will be legible but expect visible compression artifacts at very low file size targets.
- 3
JPEG and WebP are the supported formats
PNG is lossless so its size is determined by image content, not a quality slider. Use JPEG or WebP output for target-size compression. WebP often achieves a better image at the same KB target.
- 4
Resize first if you need specific dimensions too
Many government portals require both a specific pixel dimension and a file size limit. Use the Resize image tool first to get dimensions right, then compress to the KB target here.
- 5
Batch multiple files to the same target
Drop ten product images or ten scanned pages at once. Each file is independently compressed to just under the same target. Consistent output makes bulk submissions much faster.
Compressing an image to an exact file size, explained
Most compression tools hand you a quality slider and leave you to guess: drag it to 70, export, check the size, find it is still too big, drag it to 55, repeat until you give up. Compressing to a target size flips that around, so you state how many kilobytes you are allowed and the tool works out the quality for you. This guide covers how that search runs, why it only works for some formats, the limits that send people looking for it, and the tradeoffs between the size you ask for and the picture you get back. The short version: smaller targets cost quality, and dimensions matter as much as the number you type.
How the search finds your number
The method is a binary search over the quality setting. Picture the quality scale as a range from 1 to 100. The tool picks a value in the middle, encodes your image at that quality, and measures the result in bytes.

If the file is bigger than your target, the next attempt uses a lower quality. If it is smaller, the next attempt nudges quality higher to claw back detail. Each guess halves the remaining range, so the loop closes in fast: a handful of encodes is usually enough to land within a few kilobytes of the limit.
It re-encodes instead of calculating the answer directly because file size is not a clean function of the quality number. Two photos exported at quality 60 can differ in size tenfold. A flat blue sky compresses to almost nothing, while a close-up of gravel or foliage stays heavy at the same setting. The only reliable way to know how big an image lands at a given quality is to encode it and weigh the result, which the search does until the answer fits.
Read moreRead less
One rule holds throughout: the output never exceeds the number you typed. The loop always settles on a quality that produces a file at or just under the target, never over. And if your source image already weighs less than the target, there is nothing to do. The tool returns the original file untouched, because re-compressing a file that already fits would only add artifacts while saving you zero bytes.
Why only JPEG and WebP can hit a target
Target-size compression needs a quality dial to turn, and only lossy formats have one. JPEG and WebP are both lossy: they discard image information in exchange for smaller files, and the quality setting controls how much they throw away. The way JPEG compression discards detail is what gives it that adjustable dial in the first place.
Turn the dial down and the file shrinks; turn it up and the file grows. Because that relationship is smooth and predictable, a search can ride the curve to your exact target.
PNG has no such dial. It is lossless, so it stores every pixel exactly and reconstructs the image perfectly. Its file size is decided entirely by the content: how many distinct colors there are, how much flat area exists, how the rows of pixels repeat.
You cannot ask PNG to be 100 KB the way you ask JPEG to be 100 KB, because there is no quality knob. The only ways to shrink a PNG are to reduce its palette or cut its dimensions, and neither produces a precise size on demand.
So when you bring a PNG here, the practical move is to convert it to JPEG or WebP first, then let the search target your size. For graphics that must stay lossless, such as logos, screenshots with text, or line art with hard edges, the Compress PNG tool reduces size without re-encoding to a lossy format. To see how the formats stack up, the MDN image file type reference breaks down where each one fits.
WebP is worth a mention too: at the same target size, it usually produces a cleaner picture than JPEG, so if a portal accepts it you can convert to WebP for a better result on tight limits. For plain photos where you want hands-on control instead, plain JPEG compression keeps the quality slider in your hands.
The limits that make people need this
Nobody wakes up wanting to compress an image to 47 KB for fun. The need comes from a form that refuses to accept anything larger. These caps are everywhere once you start looking. Government and immigration portals are the worst offenders: visa applications, passport renewals, and national ID systems routinely demand a photo under 50 KB, or a scanned document under 200 KB, and reject anything over the line with a terse error and no help.
The same pattern repeats across job application sites that cap a resume photo or certificate at 100 KB, exam and admission portals that want a signature image under 20 KB and a face photo under 50 KB, and banking or KYC flows that hold identity scans to 1 MB. Email trips people up too: many corporate mail servers bounce messages once attachments push past a few megabytes, so a folder of photos has to come down before it will send.
Web upload widgets on forums, marketplaces, and content systems add their own ceilings, sometimes 500 KB, sometimes 2 MB. The common thread is that the limit is fixed and unforgiving, and you are expected to arrive with a file that already fits. Typing the exact cap into a target-size tool and getting back a file at or just under it is the fastest way to clear that gate on the first attempt rather than the fourth.
Why dimensions decide whether a small target looks good
Here is the part that trips people up. The same target size produces wildly different results depending on how many pixels the image holds. Squeeze a 12-megapixel phone photo, around 4000 by 3000 pixels, down to 50 KB, and the encoder has to spread that tiny budget across twelve million pixels.
The math leaves almost nothing per pixel, so the result is a blocky, smeared mess. Apply that same 50 KB target to a photo resized to 800 pixels wide, and there is plenty of budget per pixel. The picture looks clean.
The reason is simple once you see it. File size after compression is roughly the detail budget shared among all the pixels. Fewer pixels means more bytes for each one, which means less aggressive quality reduction and fewer artifacts. A small target on a small image is comfortable; the same target on a huge image is a starvation diet.
The practical takeaway: for the smallest targets, resize the photo first, then compress. If a portal wants a 50 KB photo and does not specify a large pixel size, shrink the image to roughly 600 to 1000 pixels on the long edge first, then target the KB limit. You will get a far better-looking file than forcing the full-resolution original down to the same number.
The two tools chain together cleanly: resize first, compress to size second. For the reasoning behind this, the web.dev guide to image optimization covers why dimensions and budget per pixel matter so much.
How small you can realistically go
Every photo has a floor below which compression starts to hurt, and where that floor sits depends on the dimensions and how much detail the scene holds. For a typical full-resolution photo from a phone, anything below about 100 KB starts showing visible artifacts, and below 30 KB the picture looks plainly degraded: blocky skies, mushy edges, color banding across smooth gradients.
Resize the image down first, though, and those floors drop sharply. An 800-pixel-wide photo can sit comfortably at 50 KB and still look sharp on screen. A document scan, mostly white background with dark text, compresses far more kindly than a busy photo and stays legible well under 100 KB even at a decent size, because there is so little detail for the encoder to preserve.
Use these as rough planning numbers rather than guarantees. A 1 MB target keeps almost any photo looking excellent, and 200 KB is a comfortable middle ground for a moderately sized image. 100 KB is workable for resized photos and most documents.
At 50 KB and below, resize first and accept that fine detail will soften. Below 20 KB, only simple images like signatures or small icons survive intact.
ID and passport photos: size is half the job
ID and passport photo requirements almost always come in two separate parts, and people tend to read only the one they notice first. There is a dimension requirement, stated in pixels or sometimes millimeters at a given print resolution, such as 600 by 600 pixels for a US passport upload. And there is a file-size requirement, stated in kilobytes, such as between 10 KB and 240 KB. Meeting one does not mean you have met the other.
This tool handles the file-size half. Once your photo is at the correct pixel dimensions, the target-size search brings it down to the KB window the portal demands. What it does not do is change dimensions, so it cannot fix a photo that is the wrong number of pixels. For that step you want the Resize tool, which sets exact dimensions before you touch the file size.
The order that works most reliably is dimensions first, then size. Resize the photo to the exact pixel dimensions the portal lists, then bring it here and target the upper end of the allowed KB range rather than the lowest, so you keep as much quality as the rules permit while staying under the cap. A passport photo at 600 by 600 pixels targeted to around 200 KB will look clean and clear the limit, where the same photo squeezed to 20 KB would look rough for no reason, since the portal allowed far more room.
Hitting a strict limit on the first try
A little preparation saves the back-and-forth. Before you compress anything, read the upload page closely and write down the number. Some portals state limits in MB and some in KB, and the two get mixed up constantly.
If a form says 1 MB, type 1000 in the KB field. If it says 2 MB, type 2000. Getting the unit right is the most common reason a first attempt fails.
Aim for a small cushion under the stated cap rather than dancing right on the edge. If the limit is 100 KB, targeting 95 KB gives you breathing room in case the portal measures size slightly differently than your browser does. The tool already keeps the output at or under your number, so a modest cushion costs almost no quality while removing any risk of a borderline rejection.
When a batch of files all need the same limit, drop them in together and set one target for the whole group. Each file is compressed independently to land under that cap, which makes a folder of scanned pages or product photos consistent and quick to submit. And if you need both exact dimensions and an exact size, settle the dimensions first with the Resize tool, then finish here. Every step runs inside your browser, so even sensitive identity documents stay on your own device from start to finish.
Frequently asked questions
Honest answers to what people ask before using this tool.
Further reading
Independent references if you want to go deeper on the formats and tradeoffs.