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.
| KB | 10,000 | KiB | 9,765.625 |
|---|---|---|---|
| MB | 10 | MiB | 9.5367 |
| GB | 0.01 | GiB | 0.0093 |
Not a whole number of bytes? The byte count is rounded down.
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 size | Bytes | Decimal MB | Decimal GB |
|---|---|---|---|
| 1 MiB | 1,048,576 | 1.05 MB | 0.001 GB |
| 5 MiB | 5,242,880 | 5.24 MB | 0.005 GB |
| 10 MiB | 10,485,760 | 10.49 MB | 0.010 GB |
| 20 MiB | 20,971,520 | 20.97 MB | 0.021 GB |
| 25 MiB | 26,214,400 | 26.21 MB | 0.026 GB |
| 50 MiB | 52,428,800 | 52.43 MB | 0.052 GB |
| 100 MiB | 104,857,600 | 104.86 MB | 0.105 GB |
| 500 MiB | 524,288,000 | 524.29 MB | 0.524 GB |
| 1 GiB | 1,073,741,824 | 1,073.74 MB | 1.074 GB |
| 2 GiB | 2,147,483,648 | 2,147.48 MB | 2.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.