Compress an image to an exact KB size
Government and exam portals reject anything a kilobyte over their limit, and some reject anything under a floor as well. Set the number the form demands and get back the best-looking file that fits inside it.
Compress to an exact size
Original
Compressed
Preloaded portal limits
17 upload specifications read from official sources. Each page opens with the target already set and the requirement written out.
India
- CTET Photo Upload — 10 KB to 100 KB 10–100 KB · JPEG
- CTET Signature Upload — 3 KB to 30 KB 3–30 KB · JPEG
- GATE Photo Upload — 5 KB to 600 KB 5–600 KB · 200–530 px wide · JPEG/JPG
- GATE Signature Upload — 3 KB to 300 KB 3–300 KB · 250–580 px wide · JPEG/JPG
- JEE Main Photo Upload — 10 KB to 200 KB 10–200 KB · JPEG
- JEE Main Signature Upload — 10 KB to 100 KB 10–100 KB · JPEG
- NEET Photo Upload — 10 KB to 200 KB 10–200 KB · JPEG
- NEET Signature Upload — 10 KB to 100 KB 10–100 KB · JPEG
- RRB Photo Upload — 20 KB to 300 KB 20–300 KB · 550–1000 px wide · JPEG
- RRB Signature Upload — 20 KB to 300 KB 20–300 KB · 350–550 px wide · JPEG
- SSC Photo Upload — 20 KB to 50 KB 20–50 KB · JPEG
- SSC Signature Upload — 10 KB to 20 KB 10–20 KB · JPEG
- UPSC Photo Upload — 20 KB to 200 KB 20–200 KB · JPEG
- UPSC Signature Upload — 20 KB to 100 KB 20–100 KB · JPEG
United States
Australia
United Kingdom
Common targets
The sizes people search for most, if you just need a number:
- 20 KB — set the target field above to 20. Signature uploads often land here — a scanned signature compresses well because it is mostly flat white.
- 50 KB — set the target field above to 50. This is the SSC photo limit, and tight for a 3.5 × 4.5 cm colour photo.
- 100 KB — set the target field above to 100.
- 200 KB — set the target field above to 200.
- 240 KB — set the target field above to 240. This is the US DV Lottery limit, and the most common reason DV entries are rejected.
- 300 KB — set the target field above to 300.
- 500 KB — set the target field above to 500.
- 1 MB — set the target field above to 1024.
What actually gets uploads rejected
File size is the obvious one, but it is rarely the only rule. Portals commonly check dimensions as well, and some check the aspect ratio: GATE requires the photo's width-to-height ratio to fall between 0.66 and 0.89, which a plain resizer will happily violate while hitting the KB target perfectly. RRB wants 24-bit colour depth and the candidate's name captioned at the bottom of the image. NEET wants 80% of the frame filled by the face, ears included, with no mask.
The other frequent failure is the floor. "Between 20 KB and 50 KB" trips people who compress hard and land at 12 KB. Compressing to the smallest possible file is the wrong instinct when a form specifies a range — you want to be just under the ceiling, which is what the search here aims for.
How this works
How can it hit an exact size when the quality slider is so unpredictable?
By searching instead of guessing. The relationship between the JPEG quality parameter and the resulting file size is monotonic — higher quality always means a bigger file — but it is wildly non-linear and different for every image. So the tool encodes your image repeatedly, narrowing the quality range by half each time, and keeps the largest result that still fits under your target. Eight passes resolve quality more finely than the encoder itself can act on.
Every pass re-encodes from the original decoded image rather than from the previous output. Compressing an already-compressed JPEG compounds the damage; going back to the source each time means the file you download has been through exactly one encode.
What happens when no quality setting is small enough?
Then quality is the wrong lever. A 4000 px wide photograph cannot become 20 KB at any quality without turning into mush. When the search runs out of room, the tool reduces the dimensions by 25% and searches again, repeating until it fits — and it tells you it had to, along with the final dimensions, so you are not surprised later.
Why does my file manager report a different size?
Because "KB" means two different things. This tool uses 1 KB = 1024 bytes, which is what upload validators almost always check against. macOS Finder and some Linux tools use 1 KB = 1000 bytes, which makes the same file look about 2.4% larger. If you are within a few KB of a hard limit, aim slightly under it.
Can I compress a PNG to a target size?
Not usefully. PNG is lossless, and the quality parameter has no effect on it at all — the only way to make a PNG smaller is to reduce its pixel dimensions. If you need a specific file size, choose JPEG. If your image has transparency, be aware that JPEG cannot store it; the transparent areas are filled with white before encoding, which is what every upload form expects anyway.
Does it strip EXIF and location data?
Yes, as a side effect of how it works. The image is decoded to pixels, drawn to a canvas and re-encoded, and that process does not carry metadata across. Your GPS coordinates, camera model and timestamps are not in the output file. Rotation is handled before the redraw, so photos do not come out sideways.
Is anything uploaded?
No. This site has no server-side code and no upload endpoint — it is static files behind a CDN. The compression runs in your browser. You can verify it by opening the network tab, or by disconnecting from the internet after the page has loaded and using the tool anyway.
Portals we have not published
These are held back because no official figure could be read, or because the official figures contradict each other. Guessing here would mean a rejected application:
- IBPS — IBPS publishes scanning and uploading guidelines per recruitment cycle, but every located copy is a scanned image PDF rather than machine-readable text and could not be read. Figures around 200 × 230 px and 20–50 KB circulate on coaching and resizer sites; none trace to a readable official document, so nothing is published here. Read the guideline PDF linked from your own IBPS application page.
- Passport Seva — There is no published KB or pixel limit because there is usually nothing to upload: the instruction booklet states a photograph is not required for applications submitted at a Passport Seva Kendra or Post Office PSK, where the photo is captured at the centre. A printed 4.5 × 3.5 cm photo applies only to the limited non-PSK route, and that is not a digital upload.
- PAN Card — Protean's page states JPEG at 200 DPI with a 50 KB maximum, but gives photo dimensions as 5 cm × 2.5 cm, which contradicts the 3.5 × 2.5 cm size referenced elsewhere on the same domain for form-affixed photographs and looks like an error in the source. Because the dimension figure cannot be reconciled against a second official document, this row is held back rather than shipped with a number that may be wrong.
- IRCC — IRCC's photograph specification page defines only printed requirements — a 35 × 45 mm frame with a 31–36 mm head — and says of digital photos merely that they must not be altered in any way. No KB, pixel or DPI figure for a digital upload is published, so none is invented here. For the Canadian passport digital spec, which is published, see the Canadian passport photo page.