Reduce Image Size in KB
Upload any PNG, JPEG, WebP, GIF, or BMP image, set an exact target size in kilobytes, pick your output format, and get a file at or under that size. Everything runs in your browser, so your images never leave your device.
Drag and drop an image here, or
The largest file size you want, in kilobytes. Must be greater than 0 and no more than 51,200 KB.
Choose an image, set a target size in KB, and press “Reduce to target size”.
Private by design: your image is read, compressed, and re-encoded entirely in your browser and is never uploaded to any server. Re-encoding draws the image onto a fresh canvas, which strips EXIF metadata such as camera model and GPS location. Animated GIFs are not preserved: only the first frame is compressed.
Reduce image size in KB, exactly
When an application form, exam portal, or email attachment limit says “maximum 100 KB”, you need to reduce image size in KB to an exact number, not just “make it smaller”. This free tool does exactly that. Upload any image, type your target size in kilobytes, choose JPEG, PNG, or WebP output, and download a file that lands at or under your target. Everything runs inside your browser, so your photos are never uploaded to any server, there is no sign-up, and the result carries no watermark.
This page is deliberately different from our Compress JPEG tool. Compress JPEG is JPEG-in to JPEG-out, with a target-size mode tuned for photographs. This tool is the any-format version: it accepts PNG, JPEG, WebP, BMP, and GIF (first frame only) as input and lets you pick the output format. If your starting file is a PNG screenshot and you need a 100 KB JPEG for an upload form, or a BMP scan that must become a small WebP, this is the tool built for that job.
The tool is honest about what it can and cannot do. For JPEG and WebP it first searches quality to fit your target at full size, and only shrinks the image dimensions if the lowest quality still does not fit. For PNG, which is lossless and has no quality lever, small targets are reached by shrinking dimensions, and the result panel tells you exactly which path was taken, with the final size shown to two decimal places.
How to reduce image size in KB
- Choose your image. Click “Choose image” or drag and drop a PNG, JPEG, WebP, GIF, or BMP file onto the upload area. Files up to 26 MB are accepted. The tool reads the file’s real signature bytes before decoding, so a renamed text file or document is rejected with a clear message instead of failing mysteriously.
- Type your target size in KB. Enter any positive number up to 51,200 KB. Common targets are 20 KB for thumbnails, 100 KB for forms and portals, and 200 to 500 KB for web uploads. Zero, negative, and non-numeric entries are rejected with a plain explanation.
- Pick an output format. JPEG is the default and the best choice for photos. PNG keeps pixels perfectly intact, which suits screenshots and graphics with text. WebP usually gives the smallest files of the three in browsers that support it. If your browser cannot encode WebP, that option is disabled automatically with a note.
- Press “Reduce to target size”. The tool first encodes at the lowest quality to see whether your target is reachable at full size. If it is, it searches quality over 12 passes to find the highest quality that still fits. If even the lowest quality is too big, it shrinks the dimensions in small 0.9x steps until the target is met. A status line narrates each phase so you always know what is happening.
- Download your file. The result is named after your image and target, for example photo-100kb.jpg. The result panel shows the final exact size, the quality used, the final dimensions, and how the target was reached. Copy the summary to your clipboard or print it if you need a record.
The whole process usually takes a few seconds. Because nothing leaves your browser, you can compress as many images as you like, and closing the tab removes every trace of your files.
How target-KB compression actually works
JPEG and WebP are lossy formats: a quality setting decides how much fine detail is discarded, and lower quality means fewer bytes. The tool exploits this with a binary search, the same halving strategy you would use to find a word in a dictionary. It first encodes your image at the floor quality of 0.05. If that smallest possible file is still over your target, quality alone cannot solve it and the tool moves to shrinking dimensions, described below. If the floor fits, it encodes at the ceiling quality of 0.99. When the ceiling also fits under your target, you get the ceiling immediately, the best looking file possible within your budget.
When the target lies between the two, the search begins. The tool encodes at the midpoint quality of 0.52 and keeps the half of the range that straddles the target, then repeats. After 12 passes, the range has been halved 12 times, so the remaining uncertainty is (0.99 minus 0.05) divided by 4096, about 0.0002 in quality. In practical terms the tool lands within a hair of the highest quality that fits under your target, without you having to guess a quality number yourself.
Dimension downscaling is the fallback, and it is disclosed rather than hidden. Each step multiplies width and height by 0.9, keeping 81 percent of the pixels, and re-encodes at the floor quality of 0.05. The first step that fits under the target wins, with a cap of 20 steps. A real test shows the path: a 3000 by 2000 pixel photo (1.1 MB) aimed at a 50 KB target could not fit at any quality, so after one 0.9x step to 2700 by 1800 pixels it finished at 47.00 KB, comfortably under target. If 20 steps still do not fit, the tool says so plainly instead of handing you a broken or over-size file.
PNG follows a simpler rule because it is lossless: there is no quality lever to pull, so the tool encodes at natural size and applies the same 0.9x downscale steps until the file fits. In testing, a 640 by 480 PNG aimed at 100 KB fit immediately at 10.13 KB with zero quality loss and no shrinking. Tiny PNG targets can require dramatic shrinking, which the format guide below explains honestly.
Worked example: compress an image to 100KB
The search phrase “compress image to 100kb” usually means a form or portal with a strict 100 KB upload limit. Here is exactly what this tool does with that target, using numbers from a real test run rather than a promise.
The test photo was an 800 by 600 pixel JPEG, 58,520 bytes (about 57.1 KB), already smaller than 100 KB. Typing 100 as the target and pressing the button produced a 69.43 KB JPEG at quality 0.99 with dimensions unchanged at 800 by 600, downloaded as test-100kb.jpg. Notice what happened: the tool did not just shrink blindly. It checked whether the ceiling quality fit under 100 KB, found that it did, and gave the best-looking file within budget. The output is larger than the original because the original was encoded at a lower quality, but it still lands at or under the 100 KB target, which is what the upload form checks.
A harder case shows the fallback. A 3000 by 2000 pixel photo at 1.1 MB aimed at a 50 KB target failed at every quality, so the tool shrank it one 0.9x step to 2700 by 1800 pixels and finished at 47.00 KB at the quality floor. The result panel reported “Quality floor 0.05, then dimension downscale in 1 step”, so there was no mystery about where the pixels went. Both examples ran entirely in the browser with zero console errors.
The takeaway: you type the number, and the tool does the arithmetic. You get the largest, best-looking file that fits at or under your target, and a written account of how it got there.
JPEG vs PNG vs WebP: which output format should you choose?
JPEG is the right default for photographs and for almost any target size. Its quality lever is powerful: most photos can be squeezed to a few dozen kilobytes at full dimensions before any shrinking is needed. The one tradeoff is transparency. JPEG has no alpha channel, so transparent areas of a PNG or WebP input are filled with white in the JPEG output.
WebP is the modern alternative and often produces smaller files than JPEG at similar visual quality, which makes it the best pick when every kilobyte counts and the receiving site accepts WebP. All current versions of Chrome, Edge, Firefox, and Safari encode it. If your browser cannot, this tool disables the WebP option and tells you why instead of failing.
PNG is the format to choose when pixels must stay perfect: screenshots with small text, logos, diagrams, and graphics with sharp edges. Because PNG is lossless, the quality search does not apply, and the tool reaches small targets only by shrinking dimensions. Our test needed no shrinking at all for a 100 KB target on a 640 by 480 screenshot, finishing at 10.13 KB. But be realistic about tiny targets: asking a detailed photo for a 20 KB PNG may shrink it to a fraction of its original dimensions, and the tool will show you the final dimensions so you can decide whether that tradeoff is acceptable. When a small target matters more than perfect pixels, JPEG or WebP is the honest recommendation.
Honest limitations
GIF input is decoded to its first frame only, so animation is not preserved. If you need to compress an animated GIF while keeping the animation, use our Compress GIF tool instead, which is built for that job.
EXIF metadata is stripped. The image is redrawn onto a fresh canvas during compression, which drops camera model, capture date, and GPS coordinates. For uploads this is usually welcome, because metadata can leak your location, but keep the original file if you need that data.
Some targets are mathematically unreachable, and the tool admits it. A 1 KB target on a 3000 by 2000 photo cannot be met even at minimum quality and minimum dimensions, and the tool reports “This image cannot be squeezed to 1.00 KB as JPEG” rather than handing you an over-size file. Raising the target or switching to JPEG or WebP output is the way out.
Inputs are capped at 26 MB, and images above 100 megapixels are refused with a clear message, because decoding them can freeze a browser tab. The file size is checked before anything is read, so oversized files are rejected instantly. Finally, “at or under” is the guarantee, not byte-exact: encoders quantize, so the tool aims for the largest file that fits under your number rather than an exact byte count, which no encoder could promise.
Frequently asked questions
How do I compress an image to 100KB?
Type 100 into the target size box, pick JPEG or WebP output, and press “Reduce to target size”. The tool searches quality to find the best-looking file at or under 100 KB and only shrinks dimensions if quality alone cannot fit. In a real test, an 800 by 600 photo finished at 69.43 KB at quality 0.99 with dimensions unchanged, downloaded as a file like photo-100kb.jpg.
What is the difference between this tool and Compress JPEG?
Compress JPEG is JPEG-in to JPEG-out, a specialist for shrinking photographs that are already JPEGs. This page accepts PNG, JPEG, WebP, BMP, and GIF (first frame) as input and lets you choose JPEG, PNG, or WebP as the output format. Use this tool when your starting format is not JPEG or when you want to change formats while hitting an exact kilobyte target.
Can I reduce a PNG image to a small target size?
Yes, with one honest caveat. PNG is lossless, so the tool cannot trade quality for bytes the way it does with JPEG. It encodes your PNG at natural size and shrinks the dimensions in 0.9x steps until the file fits. A 640 by 480 screenshot aimed at 100 KB fit immediately at 10.13 KB with no shrinking, but a very small target on a detailed image can shrink dimensions substantially. The result panel always shows the final dimensions so you can judge the tradeoff.
Are my images uploaded to a server?
No. Your image is read, decoded, compressed, and re-encoded entirely inside your own browser using standard web technology. It is never uploaded to Pixel File or any third party, nothing is stored on a server, and no account is needed. Closing the tab discards everything.
Why did the tool shrink my image’s dimensions?
Dimensions shrink only when quality alone cannot reach your target. The tool first encodes at the lowest quality of 0.05; if that is still over your target, it reduces width and height by 0.9x steps, re-encoding each time, until the file fits. The result panel states this explicitly, for example “Quality floor 0.05, then dimension downscale in 1 step”, along with the final dimensions.
What does the quality number in the results mean?
It is the JPEG or WebP encoder quality, from 0.05 to 0.99, that produced your file. Higher means more detail preserved. The tool picks the highest quality that fits under your target through a 12-pass binary search, so the number is the result of measurement, not a guess. For PNG output the panel reads “Lossless (PNG)” instead, because PNG has no quality setting.
Does reducing image size remove metadata from my photo?
Yes. The image is drawn onto a fresh canvas during compression, which strips EXIF data such as camera model, capture date, and GPS location. The downloaded file contains only the pixels. Keep your original if you need the metadata, and note that this stripping also protects your privacy when you upload the compressed file.
More free PDF and image tools
Pixel File offers a full set of free tools that run in your browser. Compress JPEG shrinks JPEG photos with a target-size mode, Compress PNG reduces PNG file sizes losslessly, Shrink Image Size makes images smaller by percentage, Resize Photo Resolution changes pixel dimensions precisely, and Convert to JPG turns PNG, WebP, and other images into JPG. Every tool is free, private, and needs no sign-up.
For photos headed to messaging apps, see our guide on how to reduce photo size for WhatsApp.
If the number on your form is a strict cap, read our guide on how to reduce photo size in KB for online forms for the full method, including dimensions and signature rules.
If your image too large to upload, our guide explains how to fix it.
References
- Wikipedia: Image compression — How image compression works
- Wikipedia: JPEG — The JPEG format in depth