Skip to converter

Convert megabytes to bytes

One megabyte (MB) equals 1000000 bytes (B), so multiply megabytes by 1000000 to get bytes.

How it's calculated

  1. 1 MB × 1000000 = 1000000 B

Decimal or binary?

Decimal (SI)

Powers of 1,000

  • 1 MB

1 MB = 1,000 KB

How drive makers, carriers, macOS and iOS count.

Binary (IEC 80000-13)

Powers of 1,024

  • 0.953674 MiB

1 MiB = 1,024 KiB

What Windows counts in, while still printing KB, MB and GB.

1 MiB is 4.86% larger than 1 MB, so the same 1,000,000 bytes read 4.63% lower in MiB than in MB.

Binary prefixes: IEC 80000-13, as set out by NIST, Prefixes for binary multiples.

Pairs you use or save show up here. They stay on this device.
Convert a list

Paste a column of numbers, one per line (tabs and semicolons also separate values). Each line keeps its place, so the results paste straight back next to your data.

Up to 1,000 values. Commas inside a number (2,54 or 1,000) are read as part of it.

How do you convert megabytes to bytes?

bytes = megabytes × 1000000

Last reviewed . Source: IEC 80000-13, Quantities and units: Information science and technology. How we convert

Megabyte to byte conversion table

Megabytes to bytes

MegabytesBytes
1 MB1000000 B
2 MB2000000 B
3 MB3000000 B
5 MB5000000 B
10 MB10000000 B
20 MB20000000 B
50 MB50000000 B
100 MB100000000 B
500 MB500000000 B
1000 MB1000000000 B

Reverse: bytes to megabytes

BytesMegabytes
1 B0.000001 MB
2 B0.000002 MB
3 B0.000003 MB
5 B0.000005 MB
10 B0.00001 MB
20 B0.00002 MB
50 B0.00005 MB
100 B0.0001 MB
500 B0.0005 MB
1000 B0.001 MB

To convert megabytes to bytes, multiply the number of megabytes by 1000000. One megabyte equals 1000000 bytes, and one byte equals 0.000001 megabytes, so the relationship is fixed and exact. As a worked example, 10 MB comes to 10000000 B. Enter your own figure in the converter above to get an instant answer, or use the swap button to flip the direction. This is a digital storage conversion, and like every tool on UnitGlide it runs locally in your browser with no account or upload required. The table further down shows a range of common megabyte values already worked out in bytes, plus the reverse byte to megabyte direction, which is handy for quick reference or double-checking a result by hand.

Megabyte to byte in practice

Megabytes to bytes is the conversion programmers and system administrators run when a size has to be exact, down to the last byte, rather than human-friendly.

Where exact bytes matter

Buffer sizes, upload limits, disk quotas and configuration values are all set in raw bytes, so a 5 MB upload cap becomes 5,000,000 bytes in the config on the decimal scale, and a 16 MB buffer is 16,000,000 bytes. Getting the exact count right is the difference between a limit that behaves as intended and one that is quietly off by a rounding.

Decimal here, binary elsewhere

UnitGlide uses the decimal megabyte of 1,000,000 bytes. Many programming libraries and operating systems instead mean the binary mebibyte of 1,048,576 bytes when they print MB, a gap of nearly five percent that grows with size. A value that must line up with a specific system should be checked against which of the two that system actually uses.

Bytes, not bits

As with all storage, keep bytes and bits apart: a megabyte is 1,000,000 bytes, a megabit an eighth of that. Network throughput is quoted in bits and stored file sizes in bytes, so a field expecting one and fed the other is an eightfold error that can quietly break a transfer estimate or a rate limit.

Reading the result

A byte count in the millions is awkward to eyeball, which is the whole reason MB exists, so it helps to keep a couple of anchors: 1 MB is a million bytes and 10 MB is ten million. If an exact figure lands an order of magnitude away from that, a decimal place slipped somewhere in the config.

When the last byte counts

Fixed-length formats, memory allocations and network packets care about the exact byte, not a friendly megabyte, so an off-by-a-thousand slip between decimal and binary can misalign a header or overrun a buffer. That is why serious code stores the raw byte count and only converts to MB for display, keeping the human-readable label and the exact value cleanly separated.

Frequently asked questions

How many bytes are in a megabyte?

1 megabyte equals 1000000 bytes. The ratio is constant, so you can multiply any number of megabytes by 1000000 to get bytes.

What is the formula to convert megabytes to bytes?

1000000 is the number to multiply by: bytes = megabytes × 1000000. UnitGlide applies this exact formula for every value, so results stay accurate across the whole range.

How do I convert bytes back to megabytes?

1 byte equals 0.000001 megabytes, so multiply by that to go the other way. You can also press the swap button in the converter above to flip the direction in one click.

Is this megabyte to byte converter accurate?

10 MB = 10000000 B here, worked out from internationally defined SI conversion factors, as maintained by the BIPM. All math runs in your browser, so nothing is rounded away on a server, and for everyday use the displayed precision is more than enough.

Related conversions

Embed this converter or use the API

Put this converter on your own site, or call the free JSON API. Full documentation is on the developers page.

Embed (iframe)

<iframe src="https://unitglide.net/embed/mb-to-byte" width="360" height="200"
        style="border:1px solid #e2e6ec;border-radius:12px"
        title="Megabyte to Byte converter"></iframe>
<p><a href="https://unitglide.net/convert/mb-to-byte">Megabyte to Byte Converter</a> by UnitGlide</p>

API (static JSON with every factor)

https://unitglide.net/api/v1/factors