Compress Image to 240KB — Free, Fast & Private
Three travel documents share this number. The US visa photo uploaded with the DS-160 must be 240 KB or less. The Pakistan passport and the Bangladesh e-passport both set a band of 40–240 KB. If you landed on a 250 KB compressor, that extra 10 KB is precisely the margin these forms do not give you.
What fits in 240 KB — measured on this page
We dropped five real files on the compressor above and kept what it handed back. 5 of 5 came out under 240 KB.
| File | Before | After, on this page | Under 240 KB? |
|---|---|---|---|
| 12 MP phone photo | 4032 × 3024 px · 3.73 MB | 4032 × 3024 px · 161.7 KB | Yes |
| Portrait / headshot | 3264 × 4653 px · 2.25 MB | 3264 × 4653 px · 183.7 KB | Yes |
| Scanned handwritten page | 3349 × 4281 px · 2.17 MB | 3349 × 4281 px · 233.5 KB | Yes |
| Scanned signature | 2041 × 617 px · 109.1 KB | 2041 × 617 px · 102.1 KB | Yes |
| Screenshot (PNG) | 1280 × 800 px · 88.1 KB | 1280 × 800 px · 108.8 KB — larger than the original (PNG made into JPG) | Yes |
Measured 2026-10-06 in Chromium 145.0.7632.6 with this page’s own settings. The photos are public-domain and CC0 files from Wikimedia Commons; the screenshot is our own. Sizes read as the tool shows them (1 KB = 1,024 bytes); the target itself is 240,000 bytes, which is under 240 KB on either reading.
| Document | File size | Pixels | Printed size |
|---|---|---|---|
| US visa (DS-160) | 240 KB or less | 600 × 600 | 2×2 in at 300 DPI |
| Pakistan passport | 40–240 KB | 413 × 531 | 35×45 mm at 300 DPI |
| Bangladesh e-passport | 40–240 KB | 531 × 650 | 45×55 mm at 300 DPI |
The US visa and the US passport are two different rules
The 240 KB ceiling belongs to the visa route. The State Department’s guidance, as MiniPx records it: “DS-160 accepts 600x600 to 1200x1200 px and 240 KB or less, with no minimum size.” No minimum, so for the DS-160 the only file-size question is whether you are under the ceiling.
The online passport renewal upload is a separate route with a separate band: 54 KB to 10 MB. That band has a floor, and a photo squeezed for the visa form can fall under it. If you are renewing a US passport rather than applying for a visa, you do not need this page at all — and an aggressively compressed file can be the reason the renewal upload refuses it. The US photo maker lets you pick the route and checks the file against that route’s band.
Bytes per pixel, document by document
The three documents set the same ceiling on photos of different sizes, so 240 KB means a different amount of room in each. Divide 240,000 bytes by the pixel count:
- US visa: 600 × 600 = 360,000 pixels, so about 0.67 bytes per pixel.
- Pakistan passport: 413 × 531 = 219,303 pixels, so about 1.09 bytes per pixel.
- Bangladesh e-passport: 531 × 650 = 345,150 pixels, so about 0.70 bytes per pixel.
An uncompressed colour pixel takes 3 bytes, so every one of those is a real JPEG budget but a comfortable one: at the documents’ own pixel sizes, 240 KB leaves room for a well-compressed face with its detail intact. The ceiling becomes hard only when the file has far more pixels than the document asks for — which is exactly what a photo straight off a phone has. Crop and size the photo to the document first and the 240 KB ceiling often stops being the obstacle.
Three shapes, so crop before you compress
The three documents do not even share a shape. The US photo is square: 600 ÷ 600 = 1.00. Pakistan’s is 413 ÷ 531 ≈ 0.78, and Bangladesh’s 531 ÷ 650 ≈ 0.82 — both portrait, Bangladesh’s slightly wider. One photo cropped once will not serve all three.
So crop to the shape of the document you are applying for, then resize to its pixel size, then compress here. Doing it in that order means the 240,000-byte budget is spent on the face rather than on the room behind it, and the compressor is less likely to need to reduce the pixels at all. Doing it the other way round — compress a full phone photo to 240 KB, then crop — re-encodes the JPEG a second time and stacks one set of compression damage on another.
The 40 KB floor for Pakistan and Bangladesh
Pakistan and Bangladesh set a minimum as well. MiniPx reads it strictly, counting 1 KB as 1,024 bytes: 40 × 1,024 = 40,960 bytes. On the Pakistan photo that floor works out at 40,960 ÷ 219,303 ≈ 0.19 bytes per pixel; on the larger Bangladesh photo, 0.12. Below that, the photo has been compressed harder than these offices want.
This compressor works downward only. It lowers JPEG quality first, at full size; if the lowest quality still misses 240 KB it reduces the pixel dimensions, and tells you so with the new size. It never pads a file up to reach a minimum, and a JPEG that already measures 240,000 bytes or less keeps its picture data (only metadata is removed). So it cannot rescue a photo that is already under 40 KB. For that, go back to the original camera file, or use the Pakistan passport photo maker or the Bangladesh e-passport photo maker, which size the photo to the document and check the file against both ends of the band.
Size is only one of the checks
Each office also checks the photograph itself, and none of those checks is about bytes. For Pakistan, MiniPx records: Plain white background. Recent photo with neutral expression. Both ears visible (women in hijab exempt). For Machine-Readable Passport (MRP) and e-passport applications. For Bangladesh: Plain white background. Coloured photo taken within last 6 months. No smile, mouth closed, eyes open. For e-passport (epassport.gov.bd) applications. For the US: Photo must be taken within the last 6 months. Pure white background. No head coverings except religious. The visa and passport routes publish different file-size rules — pick the one you are applying for.
Compression cannot whiten a background, open a pair of eyes or make an old photo recent. Get those right in the photograph, then bring the file under 240 KB. And treat the size shown next to your result as what it is — a measurement of the file. Whether an office accepts the photo is its decision, not the tool’s.
If an upload is refused for size, read the number next to your result before changing anything. Over 240,000 bytes means the file needs another pass here. Under 40,960 bytes, for Pakistan or Bangladesh, means it needs more detail, not less — and that only comes from the original photo.
Everything on this page runs in your browser; your photo is never uploaded to a server. For neighbouring targets see the 200KB and 250KB pages, or the passport photo maker for other countries.
