Blog
MB vs MiB: why a 10 MB file is not always 10 MB
Two units share almost the same name. Knowing which one a limit uses decides whether your upload passes or fails.
A megabyte (MB) and a mebibyte (MiB) differ by 48,576 bytes. That sounds small, but at upload limits it is the difference between a file that is accepted and one that is rejected. The difference grows with each step from kilobytes to gigabytes.
The two definitions
- MB (megabyte): 1,000,000 bytes. Decimal, the way SI prefixes work everywhere else: kilo means a thousand, mega a million.
- MiB (mebibyte): 1,048,576 bytes, which is 1,024 × 1,024. Binary, because memory and many file systems are organised in powers of two.
The binary prefixes KiB, MiB and GiB were introduced by the IEC in 1998 so that kilo, mega and giga could keep their decimal meaning. Many programs still write “MB” when they mean MiB, which is where most confusion starts.
How big the gap gets
- 1 KiB is 2.4% larger than 1 KB.
- 1 MiB is 4.9% larger than 1 MB.
- 1 GiB is 7.4% larger than 1 GB.
- 1 TiB is about 10% larger than 1 TB.
The last line explains a familiar complaint: a new 1 TB drive shows about 931 GB in Windows. Nothing is missing; the drive maker counts 1,000,000,000,000 bytes, and Windows divides by 1,024 three times but still writes “GB”.
Who uses which unit
- Windows File Explorer divides by 1,024 and labels the result KB, MB and GB.
- macOS has shown sizes in decimal units since Mac OS X 10.6.
- Drive and memory-card makers use decimal units on the packaging.
- Web services vary. Some document limits in bytes, many do not say which unit they mean.
Why a “10 MB” file can fail a 10 MB limit
Suppose a form accepts files up to 10 MB and checks 10,000,000 bytes. A file that your computer calls 10 MB may really be 10 MiB, or 10,485,760 bytes. It is 485,760 bytes over the limit and gets rejected, even though both labels say 10 MB.
The reverse also happens. If the server allows 10 MiB and you test with exactly 10,000,000 bytes, the file passes and the real limit stays unknown.
Testing an upload limit with both units
- Find the limit in the service's documentation, and note whether it gives bytes, MB or MiB.
- Create one file at the decimal size and one at the binary size. On ByteRivet, the unit menu on every test file page offers both.
- Upload both. If only the smaller one passes, the limit is decimal; if both pass, it is at least the binary size.
- For an exact boundary, use the −1 B, exact and +1 B options under “Advanced: test an upload limit” on the generator.
Remember that a form upload adds multipart headers to the request. A server that limits the whole request body can reject a file that is a few hundred bytes under the stated file limit.
Quick conversions
To convert a byte count from an error message or log, use the bytes to MB and MiB converter. Common values: 5,242,880 bytes is 5 MiB, 26,214,400 bytes is 25 MiB and 104,857,600 bytes is 100 MiB.
Source for the unit definitions: NIST, prefixes for binary multiples.
More posts

How to Test File Upload Limits: A Practical Guide
Testing an upload limit properly means three exact files, not one: at the limit, one byte over, and comfortably under — here's how and why.

File Upload Limits: Check Your Platform and Account
Find the official limit for your account and upload method, choose MB or MiB correctly, and verify the accepted byte size with boundary tests.

How to Create a Test File of Any Size
Learn how to create exact-size test files for upload limits, API testing, email attachments, storage checks and QA workflows.