The short answer: "KB" has two meanings. In SI units a kilobyte is 1,000 bytes; in the older computing convention it is 1,024 bytes, properly called a kibibyte (KiB). A photo that is "20 KB" by the 1,024 definition can be up to 20,480 bytes, which fails a form that counts 20 KB as 20,000 bytes. Of the 83 official upload limits we checked, only two let us work out the exact byte count, so the safe move is to stay under the 1,000-byte figure for maximums and over the 1,024-byte figure for minimums.
We learned this the hard way. Until October 2026, Pixohub's compress-to-size tools treated a KB as 1,024 bytes, so a "20 KB" result could be as large as 20,480 bytes and fail a portal that counts 1,000 bytes. They now target 1,000-byte kilobytes: 20 KB means at most 20,000 bytes and 1 MB at most 1,000,000 bytes, which passes under both definitions.
Two definitions of a kilobyte
The prefixes kilo, mega and giga mean 1,000, 1,000,000 and 1,000,000,000 in the SI system. Early computing borrowed "kilo" for 1,024 (210) because memory comes in powers of two. To separate the two, the International Electrotechnical Commission approved binary prefixes in December 1998: kibi (Ki) for 1,024, mebi (Mi) for 1,048,576 and so on, as NIST's reference page explains. In practice, many programs and forms still write "KB" and "MB" for either meaning.
The gap is 2.4% at the kilobyte level and grows with each step: a binary megabyte is 4.9% bigger than a decimal one.
| Stated limit | Decimal (1 KB = 1,000 bytes) | Binary (1 KB = 1,024 bytes) | Gap |
|---|---|---|---|
| 10 KB | 10,000 bytes | 10,240 bytes | 240 bytes |
| 20 KB | 20,000 bytes | 20,480 bytes | 480 bytes |
| 50 KB | 50,000 bytes | 51,200 bytes | 1,200 bytes |
| 100 KB | 100,000 bytes | 102,400 bytes | 2,400 bytes |
| 200 KB | 200,000 bytes | 204,800 bytes | 4,800 bytes |
| 500 KB | 500,000 bytes | 512,000 bytes | 12,000 bytes |
| 1 MB | 1,000,000 bytes | 1,048,576 bytes | 48,576 bytes |
| 2 MB | 2,000,000 bytes | 2,097,152 bytes | 97,152 bytes |
| 5 MB | 5,000,000 bytes | 5,242,880 bytes | 242,880 bytes |
A few hundred bytes sounds trivial, but small limits are where people get stuck. Our compressor's results at a 20 KB target landed within 4 bytes of the budget, so a tool aiming at the wrong definition really does produce files on the wrong side of the line.
How 83 official limits are written
We collected 83 image and document upload limits from 52 organisations on their own pages: passport and visa offices, Indian and Bangladeshi exam boards, email providers, social networks and developer docs. 26 of them also set a minimum size, and 21 have a maximum of 100 KB or less, 18 of those on government exam and visa forms. Here is how some of them phrase it, word for word:
| Organisation | What | Exact wording | Bytes per KB stated? |
|---|---|---|---|
| IBPS (India) | Signature | "Size of file should be between 10kb – 20kb." | No |
| Protean (PAN, India) | Photo | "Size Max. 20 KB" | No |
| HM Passport Office (UK) | Passport photo | "at least 50KB and no more than 10MB" | No |
| Chinese Visa Application Service Center | Visa photo | "a file size between 40KB-120KB" | No |
| Home Affairs (Australia) | Visa photo | "between 70Kb and 3.5Mb" | No |
| ICA (Singapore) | ABTC signature | "File size of less than 60 KBytes" | No |
| Google Play | App icon | "Max file size: 1024KB" | No |
| Immigration New Zealand | Visa photo | "between 512 KB and 3.14 MB" | No |
| Bluesky | Avatar | "maxSize": 1000000 | Yes: exact bytes |
| Mastodon | Post image | IMAGE_LIMIT = 16.megabytes | Yes, via Rails (1,024-based) |
The spelling is all over the place. Across the quotes we counted "KB" 38 times, "kb" 20 times, "kB" 6 times, "Kb" twice and "KBytes" once, and none of them says whether it means 1,000 or 1,024 bytes. Round binary-looking numbers such as Google Play's 1024KB or New Zealand's 512 KB hint at the 1,024 convention, but the pages don't confirm it, so we don't know how those sites count.
Only two entries pin down the bytes. Bluesky's profile lexicon caps avatars at 1,000,000 bytes: a "1 MB" file made the binary way (up to 1,048,576 bytes) would be rejected. Mastodon's code sets the image limit as 16.megabytes, and in Ruby on Rails megabytes multiplies by 1,024 × 1,024 (its own example: 2.megabytes # => 2_097_152), so the limit is 16,777,216 bytes. Individual Mastodon servers can set their own limits.
Your computer may count differently from the form
Part of the confusion is that operating systems disagree too. Microsoft's Raymond Chen explains in Why does Explorer use the term KB instead of KiB? that although the IEC established the kibibyte for 1,024 bytes, "Windows Explorer continues to use the abbreviation KB" for it. So by Windows' count a 20,000-byte file is 19.5 KB, and a file Windows calls "20 KB" can be over 20,000 bytes.
Apple's support article on storage capacity says that some systems, "such as iOS 10 and earlier and OS X Leopard and earlier", report capacity using the binary system, and Apple's developer documentation for the file byte-count style says "in macOS 10.8, this uses the decimal style, but that may change over time". So the same file can show a different number of KB on a Mac and on a Windows PC. Neither number tells you how the upload form counts.
The number that settles it is the exact byte count. On Windows it's in the file's Properties window; on a Mac, in Get Info.
How to size a file so it passes either way
- For a maximum, use the 1,000-byte figure. "20 KB" means at most 20,000 bytes; "1 MB" at most 1,000,000. That passes whichever definition the site uses.
- For a minimum, use the 1,024-byte figure. "At least 50KB" means at least 51,200 bytes. A 50,000-byte file passes a decimal check but fails a binary one.
- Check the byte count, not the rounded label. "19.9 KB" on screen could be either side of 20,000 bytes depending on who rounded it.
- Leave a little headroom if a form still rejects a file that should fit: a few percent under the maximum costs almost nothing in quality.
For ranges, that leaves a band that works everywhere:
| Requirement | Stated range | Safe under both definitions |
|---|---|---|
| IBPS / SBI photo | 20–50 KB | 20,480–50,000 bytes |
| IBPS / SBI / SSC signature | 10–20 KB | 10,240–20,000 bytes |
| Chinese visa photo | 40–120 KB | 40,960–120,000 bytes |
| UK passport photo (online) | 50 KB–10 MB | 51,200–10,000,000 bytes |
| Canadian passport photo (online renewal) | 200 KB–5 MB | 204,800–5,000,000 bytes |
| Estonian diplomatic ID photo | 1–5 MB | 1,048,576–5,000,000 bytes |
What we changed in our compressor
Our compress to 20 KB, 50 KB, 1 MB and other target-size tools now aim at 1,000-byte kilobytes and 1,000,000-byte megabytes, and show the exact byte budget next to the target. They search for the highest JPG quality that fits and, only if quality alone can't get there, scale the photo down just enough.
After the change we re-ran all 23 targets from 10 KB to 5 MB on 20 full-size iPhone photos and the 24 Kodak test images. All 1,012 results were under the decimal budget. The tightest was 19,996 bytes at the 20 KB target, 4 bytes under; at 1 MB the largest photo result was 999,664 bytes. The median phone photo at 20 KB came out at 19.8 KB (decimal). Our earlier article on compressing to a target size covers the quality side of those results. For passport and visa uploads, the passport photo tool handles the size and framing.
How we tested
Limits: we collected 83 upload limits from official pages only (government sites and official application PDFs, help centres, developer docs and the organisations' own source code on GitHub), recording each limit, the exact quote and the URL, and checked every entry on 24 October 2026. We counted unit spellings across the quotes and marked a limit as defining its unit only where the page or code gives an exact byte count or a definition we could trace to official documentation. Operating-system behaviour comes from the Microsoft and Apple pages linked above.
Compressor: on 24 October 2026 we drove each compress-to-size page in Chromium via Playwright 1.64.1 on an Apple M2 Mac, uploaded each test image, and saved exactly what the download button returns. The images are 20 iPhone photos from Wikimedia Commons and the 24 Kodak images, listed in our editorial policy; the method is described under how we test the tools. We measured each file's size in bytes and compared it with the target × 1,000 (or MB × 1,000,000).
Limitations: we can't see how most sites count a KB, because their pages don't say and their server code is private; where we say "we don't know", that's literal. Limits change, especially on exam notifications that are reissued each year, so check the current notice before you upload. Some sites also check pixel dimensions, format or the photo itself, so a file within the size range can still be rejected for other reasons.