GetFormatted

KB vs MB vs KiB: why file-size limits are ambiguous

Updated 2026-09-30

UnitDecimal (SI)Binary (IEC)
Kilobyte1 KB = 1,000 bytes1 KiB = 1,024 bytes
Megabyte1 MB = 1,000,000 bytes1 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

LimitSafe target (about 10% under)
20 KB18 KB
50 KB45 KB
100 KB90 KB
200 KB180 KB
1 MB900 KB
4 MB3.6 MB
5 MB4.5 MB
10 MB9 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.

Related guides