KB vs MB vs KiB: why file-size limits are ambiguous
Updated 2026-09-30
| Unit | Decimal (SI) | Binary (IEC) |
|---|---|---|
| Kilobyte | 1 KB = 1,000 bytes | 1 KiB = 1,024 bytes |
| Megabyte | 1 MB = 1,000,000 bytes | 1 MiB = 1,048,576 bytes |
Many portals write “MB” without saying which one they mean. The difference is about 5%, which is enough to make a file at 4.1 million bytes pass on one system and fail on another.
How much headroom?
Aim about 10% under the stated limit. For a 4 MB limit that is a target of about 3.6 MB; for a 200 KB limit, about 180 KB. The compress tool accepts a target in KB.
Quick reference
| Limit | Safe target (about 10% under) |
|---|---|
| 20 KB | 18 KB |
| 50 KB | 45 KB |
| 100 KB | 90 KB |
| 200 KB | 180 KB |
| 1 MB | 900 KB |
| 4 MB | 3.6 MB |
| 5 MB | 4.5 MB |
| 10 MB | 9 MB |
Frequently asked questions
- How many KB are in 1 MB?
- 1,000 KB in decimal units, or 1,024 KiB in binary units. Portals rarely say which they use.
- Should I aim for the exact limit?
- No. Leave headroom of about 10% so a different definition of MB does not reject the file.