Bytes to MB and MiB converter

Type a size in any unit to see its exact byte count and its decimal (MB) and binary (MiB) values side by side.

10,000,000 bytes
KB10,000KiB9,765.625
MB10MiB9.5367
GB0.01GiB0.0093

Not a whole number of bytes? The byte count is rounded down.

Make a test file of this size

Decimal and binary units

Decimal units count in powers of 1,000: 1 KB is 1,000 bytes, 1 MB is 1,000,000 bytes and 1 GB is 1,000,000,000 bytes. Binary units count in powers of 1,024: 1 KiB is 1,024 bytes, 1 MiB is 1,048,576 bytes and 1 GiB is 1,073,741,824 bytes.

The gap grows with each step: about 2.4% at KB, 4.9% at MB and 7.4% at GB. That is why a file described as “10 MB” can be rejected by a form that allows 10 MB: the file may be 10 MiB, which is 485,760 bytes larger than a decimal 10 MB limit.

Common sizes in bytes

Byte counts that often appear in upload limits, logs and API errors, with their decimal equivalents:

Binary sizeBytesDecimal MBDecimal GB
1 MiB1,048,5761.05 MB0.001 GB
5 MiB5,242,8805.24 MB0.005 GB
10 MiB10,485,76010.49 MB0.010 GB
20 MiB20,971,52020.97 MB0.021 GB
25 MiB26,214,40026.21 MB0.026 GB
50 MiB52,428,80052.43 MB0.052 GB
100 MiB104,857,600104.86 MB0.105 GB
500 MiB524,288,000524.29 MB0.524 GB
1 GiB1,073,741,8241,073.74 MB1.074 GB
2 GiB2,147,483,6482,147.48 MB2.147 GB

For example, 26,214,400 bytes is exactly 25 MiB, which is 26.21 MB, and 20,971,520 bytes is exactly 20 MiB.

Questions

How many bytes are in 1 MB?

In decimal (SI) units, 1 MB is 1,000,000 bytes. The binary unit 1 MiB is 1,048,576 bytes. Upload limits, storage vendors and operating systems do not all use the same one, so check which one a limit means.

How much is 104,857,600 bytes?

Exactly 100 MiB, or 104.86 MB in decimal units.

Why does Windows show a smaller size than the file's label?

File Explorer divides by 1,024 but labels the result KB, MB and GB. A file of 10,000,000 bytes is shown as 9.53 MB there, while macOS, which uses decimal units, shows 10 MB.

Which unit should I use to test an upload limit?

Use the unit the service documents. If it does not say, test both: a file of the decimal size and one of the binary size show which one the server enforces.

Reference and next steps

Unit definitions: NIST, prefixes for binary multiples.

Read MB vs MiB: why a 10 MB file is not always 10 MB, or open the test file generator to create a file at an exact byte count.