What this MB to bytes converter does
Type a megabyte value and this converter returns the exact byte count under both standards at once. The decimal answer multiplies by 1,000,000. The binary answer multiplies by 1,048,576. Neither is "the right answer" in isolation — they describe the same physical quantity using two different definitions of what "MB" means.
What makes this converter different from a plain calculator is that it recognises binary boundaries automatically. When you enter 5 MB, the decimal answer is 5,000,000 bytes and the binary answer is 5,242,880 bytes. That second number looks arbitrary in decimal but it is exactly 5 × 1,048,576 — a clean MiB boundary. A green "Exact match" panel appears when your input produces a whole-number MiB value, telling you exactly which boundary you have hit. That is the fastest way to recognise why a file that Windows reports as "5 MB" actually contains 5,242,880 bytes.
The converter also includes a developer view that shows the byte count in hex, octal, and binary. If you are debugging a file-size check in code or reading a memory dump, the hex representation often reveals the intended value faster than the decimal form does.
How to use it
- Drop a file (optional). Drag any file onto the dashed drop zone. The tool reads the file's exact
.sizevalue and shows you the MB equivalent in both standards. Your last five dropped files stay as quick-load chips below the zone. - Or type a value. Whole numbers (5) and decimals (2.5) both work. Commas are stripped automatically.
- Click an instant chip if you want. The strip above shows the MB values people search for most (1, 2, 4, 5, 8, 10, 16, 25, 50, 100 MB) with their exact byte counts.
- Use the quick math buttons. ×2, ×10, ×1000 and ÷2, ÷10, ÷1000 let you explore nearby values without retyping.
- Change the input unit if needed. The dropdown accepts MB, MiB, B, KB, KiB, GB, GiB, and TB. Every result updates immediately.
- Read the exact-match panel. If your input produces a clean binary boundary, a green callout appears telling you exactly which MiB value it is.
- Check the developer view. The dark panel shows the value in hex, octal, and binary for code-adjacent use.
- Check the practical equivalents. The amber panel translates the current size into real-world file equivalents (pages of text, photos, songs, films).
- Compare against real files. The comparison panel shows common file types from a favicon up to an HD video. Every row is clickable.
- Copy or share. Copy result, copy all units, or share a link — the URL encodes the current value and unit.
Why you get two different answers
The prefixes mega and mebi come from two different standards that were designed decades apart. Mega is a decimal prefix defined by the International System of Units (SI) in 1795, meaning exactly 1,000,000. Mebi is a binary prefix introduced by the International Electrotechnical Commission (IEC) in 1998, meaning exactly 1,048,576 (2 to the power of 20).
Storage manufacturers, cloud providers, and ISPs use decimal. Windows, macOS, and RAM specifications use binary. The operating systems still print the SI labels ("MB") on the binary values, which is why the numbers on your screen never quite match the numbers on a box. The ratio between the two is 1,048,576 ÷ 1,000,000 = 1.048576, which is 4.86 percent.
At the byte-to-MB level the gap is smaller in absolute terms than at higher scales, but the ratio is the same. A value of 1,000,000 bytes shows as 1 MB decimal and 0.9537 MiB binary — the same byte count, different units.
| Prefix | Symbol | Meaning | Defined by | Where you see it |
|---|---|---|---|---|
| byte | B | 8 bits, base unit | Historical | Every file-size measurement starts here |
| kilo | KB | 1,000 bytes | SI (1795) | File managers, network dashboards |
| kibi | KiB | 1,024 bytes | IEC (1998) | Windows, macOS, RAM |
| mega | MB | 1,000,000 bytes | SI (1795) | Cloud quotas, data plans, upload limits |
| mebi | MiB | 1,048,576 bytes | IEC (1998) | Windows File Explorer, macOS Finder |
| giga | GB | 1,000,000,000 bytes | SI (1795) | Hard drive labels, cloud tiers |
| gibi | GiB | 1,073,741,824 bytes | IEC (1998) | Windows disk displays |
Why exact binary boundaries matter
Byte counts that are clean multiples of 1,048,576 show up all over computing, but they look strange in decimal. A file that Windows says is "5 MB" actually has 5,242,880 bytes — which looks arbitrary if you assume decimal MB but is exactly 5 MiB if you assume binary. Recognising this pattern is the fastest way to sanity-check a file size.
Common exact-MiB byte values you are likely to encounter:
| MB value | Exact MiB | Exact bytes | Where it appears |
|---|---|---|---|
| 1 MB | 1 MiB | 1,048,576 | Base memory page, DOS-era file limit |
| 4 MB | 4 MiB | 4,194,304 | 32-bit page boundary, common buffer size |
| 5 MB | 5 MiB | 5,242,880 | Image upload limits, some CMS caps |
| 10 MB | 10 MiB | 10,485,760 | Legacy file uploads, buffer allocations |
| 25 MB | 25 MiB | 26,214,400 | Gmail attachment limit (binary interpretation) |
| 50 MB | 50 MiB | 52,428,800 | API payload limits, some upload tiers |
| 100 MB | 100 MiB | 104,857,600 | Enterprise API limits, larger upload caps |
| 1,000 MB | 1,000 MiB | 1,048,576,000 | One decimal gigabyte in binary bytes |
💡 A quick mental check. If a byte count ends in the pattern 576, 152, 728, 304, 880, or 456 — those are the suffixes that appear at the end of clean MiB multiples. A byte count ending in 880 is very likely a whole-number MiB value. This tool confirms it automatically.
Why developers use MB to bytes conversions
Anyone working with file sizes, API payloads, network bandwidth, or storage in code encounters byte counts constantly. Code rarely talks in "megabytes" — it talks in raw integers because that is the only way to be exact. The MB conversion is what happens when those integers need to be explained to a person.
- API payload limits. Most REST APIs and message queues cap request bodies in bytes or KB. Converting to MB makes those numbers human-readable.
- Content-Length headers. HTTP responses include a
Content-Lengthheader in bytes. Debugging a slow or failing request often involves comparing this to expected sizes. - Database column limits. BLOB and TEXT columns have byte-based limits that developers regularly need to check against incoming payloads.
- Memory allocation. Buffer sizes, page sizes, and memory-mapped regions are always defined in bytes because that is what the OS exposes.
- Logging and monitoring. Metrics systems often record byte counts because they are unambiguous — MB values can mean either standard and lead to confusion across teams.
- Bitwise operations. Any code that does
size << 20is multiplying by 1,048,576 to get MiB. Seeing the byte count in binary form (via the developer panel above) makes those operations intuitive. - Debugging file-size checks. If a program refuses to accept a file that looks within the limit, the byte count reveals whether the limit is in decimal or binary. A "5 MB" limit means 5,000,000 bytes in decimal or 5,242,880 in binary — often the cause of the mismatch.
Notes on common search variants
This page answers a family of search phrasings that all mean the same conversion. The math does not change with the language or shorthand.
- mb to bytes, mb in bytes, mb into bytes — the standard English variants. Multiply by 1,000,000 for decimal bytes or by 1,048,576 for binary bytes.
- mb a bytes — Spanish and Portuguese. "A" means "to" in both languages.
- 1 megabyte in bytes — the singular form asking for the byte count of one megabyte. 1,000,000 bytes decimal or 1,048,576 bytes binary.
- megabytes in bytes — the plural form. Same conversion.
- convert mb to bytes — the intent phrasing.
- mb to bytes converter — the tool-seeking phrasing.
- Specific MB values: 1, 2, 4, 5, 8, 10, 16, 25, 50, 100 MB — each appears as an instant chip, a reference table row, and a direct-answers table entry.
- megabytes to bytes formula — the mathematical relationship. The formula is
bytes = MB × 1,000,000(decimal) orbytes = MiB × 1,048,576(binary).
How to convert MB to bytes in Excel and Google Sheets
Assuming your MB value is in cell A1, these formulas work in both Excel and Google Sheets:
The CONVERT function is preferred in shared spreadsheets because the unit names are explicit. Anyone reviewing the file can see exactly which standard is being used — a small detail that prevents silent errors in models where MB and MiB are mixed.
Where MB to bytes conversion actually matters
- Checking an upload against a website's limit. Drop the file onto the drop zone and read the byte count. Compare against the site's stated MB cap using the decimal answer (which is what the site actually enforces).
- Debugging a database insertion error. If a BLOB column rejects a payload, checking the byte count against the column's limit tells you whether the value is genuinely over or whether the column limit is decimal versus binary.
- Comparing file sizes across operating systems. A file shown as "5 MB" in Windows Explorer has a different byte count from a "5 MB" reference in a Linux shell. Converting both to bytes makes the comparison honest.
- Reconciling an API bill. Cloud providers bill egress in GB but meter it in bytes. Converting byte counts to MB makes the intermediate numbers more readable when auditing.
- Reading a memory dump or debugger output. Memory addresses and buffer sizes are shown in hex. The developer view panel here shows both the hex representation and its MB equivalent.
- Configuring a CDN or web server. Cache, gzip, and compression thresholds are often configured in bytes. Converting to MB makes the config more readable for non-developers.
- Verifying a file download. If a download reports a different byte count from the expected one, converting both to MB reveals whether the discrepancy is small (rounding) or large (a real problem).
- Setting an email attachment size. Most mail servers cap attachments in bytes. Converting to MB against the server's stated cap confirms whether the attachment will be accepted.
Which standard should you use
| Context | Use | Why |
|---|---|---|
| Website upload limits | Decimal | Virtually every platform enforces decimal byte limits |
| Cloud storage quotas | Decimal | Google Drive, iCloud, Dropbox all use decimal |
| Mobile data plans | Decimal | Carriers bill in decimal MB/GB |
| Windows File Explorer display | Binary | Windows divides by 1,024 at each step but labels it "MB" |
| macOS Finder display | Binary | Same as Windows — binary division, SI label |
| Android Storage view | Binary | Android divides by 1,024 and labels the result "MB" |
Linux ls -lh output | Binary | Binary division, SI label (configurable) |
| Programming and APIs | Raw bytes | Always use raw integers — never store human-readable MB values |
Common mistakes and how to avoid them
- Assuming one answer. "How many bytes in a MB" has two valid answers — 1,000,000 and 1,048,576. They differ by 4.86 percent. Both are correct in their own contexts.
- Dividing instead of multiplying. MB is the bigger unit; converting to bytes makes the number bigger. The correct operation is multiplication.
- Forgetting that upload limits are decimal. A "10 MB limit" is 10,000,000 bytes, not 10,485,760. A file that Windows reports as "10.0 MB" contains 10,485,760 bytes — over the limit.
- Confusing MB and MiB. Different units, different byte counts. The difference grows in absolute terms as values increase.
- Confusing MB and Mb. Megabyte (MB) and megabit (Mb) differ by a factor of 8. Internet speed is in Mb; file size is in MB.
- Pasting byte values with text attached. If you copy "10485760 bytes" from a file manager, the word "bytes" needs to be stripped. This tool does that automatically, but most converters do not.
- Using floats where integers belong. In code, byte counts should always be stored and compared as integers. Floating-point rounding errors can cause off-by-one bugs in size checks.
- Ignoring the exact-boundary pattern. Byte values that end in 576, 152, 728, or 880 are often clean MiB multiples. Recognising the pattern saves a conversion step.
Privacy and data handling
Every calculation happens inside your browser. Nothing you type is uploaded, logged, cached, or stored on any server. If you drop a file onto the drop zone, the browser reads only the file's .size property — a single integer the operating system already knows. The file's contents are never opened, decoded, or sent anywhere. Recent values and recently dropped file names are stored only in your browser's local storage so the tool can offer them back to you; both can be cleared with the buttons on the page. There is no account, no login, and no network request after the page loads.
Limitations to be aware of
- JavaScript uses IEEE 754 double-precision floats for numbers, which are exact for integers up to 253 (9,007,199,254,740,992). Byte counts larger than that lose precision in the display. For petabyte-scale values, work with the number as a string or split the value.
- Display values are shown with up to about 8 significant figures. Very large byte counts may show trailing zeros — use the exact-byte display for full precision.
- The exact-match panel only recognises clean multiples of 1,048,576 (MiB). It does not flag other patterns like exact decimal-MB multiples, because those are not what users typically look for.
- The file drop zone reads size only. It does not open, preview, edit, convert, or process the file itself.
- On rare occasions — iCloud "optimized storage" placeholders, OneDrive "files on-demand" items — the size the browser reports is the placeholder size, not the eventual downloaded size.
- The developer view shows hex, octal, and binary for values up to 253. Larger values display a precision warning.
- History is per-browser. It does not sync across devices, and clearing your browser's site data will wipe it.
Frequently asked questions
How many bytes are in 1 MB?
1 MB equals exactly 1,000,000 bytes in the decimal (SI) standard used by storage makers, ISPs, and cloud providers. It equals 1,048,576 bytes in the binary (IEC) standard that Windows, macOS, and RAM specifications use internally — though the correct name for that binary unit is MiB. Both numbers describe different units, not different amounts of data.
How do I convert MB to bytes?
Multiply the number of megabytes by 1,000,000 for the decimal byte answer, or by 1,048,576 for the binary MiB byte answer. For example, 5 MB × 1,000,000 = 5,000,000 bytes in decimal; 5 MiB × 1,048,576 = 5,242,880 bytes in binary.
What is 1 MB in bytes?
1 MB = 1,000,000 bytes (decimal/SI). 1 MiB = 1,048,576 bytes (binary/IEC). The two answers describe different units, not different amounts of data. Windows shows a 1 MB file as 1,048,576 bytes because it uses the binary standard internally.
What is 2 MB in bytes?
2 MB = 2,000,000 bytes in decimal. 2 MiB = 2,097,152 bytes in binary. The binary value is larger because 2 × 1,048,576 = 2,097,152.
What is 4 MB in bytes?
4 MB = 4,000,000 bytes in decimal. 4 MiB = 4,194,304 bytes in binary. The binary value 4,194,304 is 2 to the power of 22, which is why it appears frequently in memory and buffer contexts.
What is 5 MB in bytes?
5 MB = 5,000,000 bytes in decimal. 5 MiB = 5,242,880 bytes in binary. The binary value is 5 × 1,048,576, a common upload limit and buffer size.
What is 8 MB in bytes?
8 MB = 8,000,000 bytes in decimal. 8 MiB = 8,388,608 bytes in binary. This is another clean binary boundary — 2 to the power of 23.
What is 10 MB in bytes?
10 MB = 10,000,000 bytes in decimal. 10 MiB = 10,485,760 bytes in binary. The binary value is 10 × 1,048,576, a common buffer size and legacy upload cap.
What is 16 MB in bytes?
16 MB = 16,000,000 bytes in decimal. 16 MiB = 16,777,216 bytes in binary. This is 2 to the power of 24 — another clean memory boundary.
What is 25 MB in bytes?
25 MB = 25,000,000 bytes in decimal. 25 MiB = 26,214,400 bytes in binary. This is the classic Gmail attachment limit in binary terms.
What is 50 MB in bytes?
50 MB = 50,000,000 bytes in decimal. 50 MiB = 52,428,800 bytes in binary. The binary value is 50 × 1,048,576, a common enterprise API and upload cap.
What is 100 MB in bytes?
100 MB = 100,000,000 bytes in decimal. 100 MiB = 104,857,600 bytes in binary. This is 100 × 1,048,576 — the size of many legacy file-upload limits.
What does "mb a bytes" mean?
"mb a bytes" is Spanish and Portuguese for "mb to bytes". "A" means "to" in both languages. The conversion is identical: multiply by 1,000,000 (decimal) or 1,048,576 (binary).
What does "1 megabyte in bytes" mean?
It asks for the byte count of one megabyte. In the decimal standard, 1 MB = 1,000,000 bytes. In the binary standard, 1 MiB = 1,048,576 bytes.
What does "megabytes in bytes" mean?
The plural form of the same conversion. It asks how many bytes are in a given number of megabytes. Multiply by 1,000,000 (decimal) or 1,048,576 (binary).
Is a byte smaller than a megabyte?
Yes, much smaller. A byte is the base unit of digital storage; a megabyte contains one million bytes (decimal) or 1,048,576 bytes (binary). The order from smallest to largest is: byte, KB, MB, GB, TB.
Why does Windows show a different byte count than my calculation?
Windows uses the binary (IEC) standard internally — it multiplies MB by 1,048,576 to get bytes. A website or cloud provider quoting a "5 MB limit" likely means 5,000,000 bytes (decimal). The two answers differ by about 4.86 percent.
How do I convert MB to bytes in Excel or Google Sheets?
Use =A1*1000000 for the decimal answer or =A1*1048576 for the binary answer. Excel and Google Sheets also support the CONVERT function: =CONVERT(A1,"Mbyte","byte") or =CONVERT(A1,"Mibyte","byte").
Does this converter upload my file?
No. Files you drop, browse, or paste are read in your browser using the File API. Only the file's byte count is read — its contents are never opened, uploaded, or stored anywhere.
Does this tool save my values?
Recent values and recently dropped file names are stored only in your browser's local storage so the tool can offer them back to you. Both can be cleared with one click. Nothing is ever uploaded to a server.
How does this MB to Bytes converter differ from other online converters?
Most MB to Bytes converters give you one number and stop. This one shows both standards side by side, confirms exact binary boundaries with a green banner, includes a developer view with hex/octal/binary output, provides presets for real-world file sizes, offers reverse conversion, and remembers your recent conversions.
Related tools on AIToolsPros
Sources and methodology
- BIPM — The International System of Units (SI) Brochure: the authoritative reference for the decimal prefixes kilo, mega, giga, and tera.
- International Electrotechnical Commission: publisher of IEC 60027-2, which introduced the binary prefixes kibi, mebi, gibi, and tebi in 1998.
- NIST — Prefixes for Binary Multiples: US National Institute of Standards and Technology guidance on when to use SI versus IEC prefixes.
- Wikipedia — Byte: history and definition of the byte as the base unit of digital information.
- Wikipedia — Megabyte: MB / MiB definitions and industry context.
- Wikipedia — Binary prefix: origin and evolution of the two competing prefix systems.
- MDN — Number.MAX_SAFE_INTEGER: reference for JavaScript integer precision limits.
- MDN — File API: reference for the browser API used to read dropped file sizes.
- Microsoft Support — CONVERT function: documentation for the Excel and Google Sheets CONVERT function.