FileSizeCalc

Bytes to MB Converter — Bytes to Megabytes

A bytes to MB converter turns an exact byte count — the number you see in file properties, logs, APIs and database columns — into the megabytes humans read.

Quick answer: Divide by 1,000,000 for decimal MB, or by 1,048,576 for binary MB (MiB). 5,242,880 bytes is exactly 5 MiB and 5.24 MB decimal.

Which convention should the plain KB/MB/GB/TB labels use?
Result
9.5367e-7
1 B = 9.5367e-7 MB
Exact factors
1 B =9.5367e-7 MB
1 MB =1,048,576 MB
Bytes per unit1 B = B
Same value, other convention
With the 1000 rule1.0000e-6 MB

The two lines are the same file — only the definition of “GB” differs. This 2.4% gap per step is why a 1 TB drive shows 931 GiB in Windows.

Common BMB values
BMB
1,048,5761
5,242,8805
10,485,76010
52,428,80050
104,857,600100
1,073,741,8241,024
If you are converting for a download estimate, remember that network speeds are quoted in bits per second (Mbps) while file sizes are bytes — 100 Mbps moves about 12.5 MB per second. Use the download time calculator for that math.
Results are computed locally in your browser. Binary (1024) is what Windows and most disk tools show; decimal (1000) is what drive and cloud vendors print on the box — the same file can honestly be described by both numbers.
Core facts
1 MB decimal1,000,000 bytes
1 MiB binary1,048,576 bytes (1024²)
1 GB10⁹ bytes decimal · 2³⁰ bytes binary
Where bytes appearWindows file properties, HTTP content-length, S3 storage reports, memory profilers

Bytes are the only unambiguous unit

Every storage dispute ends when you convert to bytes: 1,048,576 bytes is 1 MiB and 1.048576 MB decimal, and no vendor can argue about it. When an API returns 3,145,728, dividing by 1,048,576 gives 3 MiB — a number that matches what a file manager shows, which is what most developers actually want.

Reading logs and API payload sizes

HTTP content-length, S3 object sizes and database blob columns are always bytes. A 250,000-byte JSON response is 250 kB decimal (0.25 MB), while a 1,500,000-byte image is 1.5 MB decimal or 1.43 MiB binary. Keeping both conversions available stops the classic off-by-5% in dashboards and cost estimates, where storage pricing is decimal but tooling displays binary.

When to use this calculator

  • Choosing the right unit for a storage-cost estimate (providers bill per GB decimal).
  • Verifying a file really exceeds an upload limit expressed in bytes.
  • Reading memory or cache sizes from logs and profilers.
  • Converting database blob sizes for a user-facing report.

Frequently asked questions

Frequently Asked Questions

How many bytes in 1 MB?
1,000,000 bytes decimal or 1,048,576 bytes binary (MiB).
How do I convert bytes to MB quickly?
Decimal: divide by 1,000,000 (or move the decimal point six places). Binary: divide by 1,048,576.
Is 1,000,000 bytes 1 MB?
Yes in decimal, which is what most web and cloud services use. Windows would call it 0.95 MiB.
Why do APIs always return bytes?
Bytes are an exact integer count with no ambiguity, so protocols and databases avoid the KB/MB/GiB naming problem entirely.