MB to Bytes Converter
Convert megabytes to a raw byte count, for config limits and headers that have to be given in bytes.
1 Megabyte (decimal) = 1000000 B Both units are exactly defined, so this conversion is exact.
| Megabyte (decimal) | Byte |
|---|---|
| 1 MB | 1,000,000 B |
| 2 MB | 2,000,000 B |
| 5 MB | 5,000,000 B |
| 10 MB | 10,000,000 B |
| 25 MB | 25,000,000 B |
| 50 MB | 50,000,000 B |
| 100 MB | 100,000,000 B |
| 500 MB | 500,000,000 B |
| 1,000 MB | 1,000,000,000 B |
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the MB to Bytes Converter does
Use this MB to bytes converter to convert megabytes to a raw byte count, for config limits and headers that have to be given in bytes. It covers 5 units and converts in both directions, so you can start from whichever figure you already have. It is most often used for setting an upload size limit in a web server or application config. There are more free online tools on FreeToolStation.org.
How to use it
- Type the megabyte (decimal) figure into the first box.
- The byte value appears immediately in the second box.
- Use the swap button to run the conversion the other way, or change either dropdown for a different unit.
- Press Copy result to put the converted figure on your clipboard.
How it works
Configuration files usually want bytes: upload limits, buffer sizes and quotas are nearly always expressed as a plain integer. This page uses the decimal definition, where each step up is a factor of 1000. That is the SI meaning, the one drive and network manufacturers use, and the one the SI prefixes kilo-, mega- and giga- have everywhere else in science. The binary units — kibibyte, mebibyte, gibibyte, each a factor of 1024 — are listed in the dropdown if you need them. Note that many server configs actually expect the binary value, so check whether the software documents 1024 or 1000 before pasting.
Exact, and the result should be a whole number. A fractional byte means the input had more precision than bytes can carry.
Megabyte (decimal) to Byte reference table
| Megabyte (decimal) | Byte |
|---|---|
| 1 MB | 1,000,000 B |
| 2 MB | 2,000,000 B |
| 5 MB | 5,000,000 B |
| 10 MB | 10,000,000 B |
| 25 MB | 25,000,000 B |
| 50 MB | 50,000,000 B |
| 100 MB | 100,000,000 B |
| 250 MB | 250,000,000 B |
| 500 MB | 500,000,000 B |
| 1,000 MB | 1,000,000,000 B |
All supported units and their factors
| Unit | Symbol | Base units per unit | Notes |
|---|---|---|---|
| Megabyte (decimal) | MB | 1000000 | exact |
| Byte | B | 1 | exact |
| Kilobyte (decimal) | kB | 1000 | exact 1000 bytes — the SI meaning used by drive manufacturers. |
| Gigabyte (decimal) | GB | 1000000000 | exact |
| Bit | bit | 0.125 | exact |
When to use it
- Setting an upload size limit in a web server or application config.
- Writing a byte threshold into a monitoring rule.
- Converting a quoted file size into the integer an API expects.
Common mistakes to avoid
- Using 1,000,000 where the software documents 1,048,576, which sets the limit 4.8% low.
- Leaving a decimal point in a field that wants an integer.
- Confusing the limit units — some configs take megabytes directly with an M suffix.
Frequently asked questions
Should a config limit use 1000 or 1024?
Whatever its documentation says. Nginx and Apache size suffixes use 1024; cloud APIs usually use 1000. The page gives both via the dropdown.
How many bytes is 5 MB?
5,000,000 decimal, or 5,242,880 if the software means mebibytes.
Why is my result not a whole number?
Because the megabyte figure had more decimal places than a byte count can represent. Round to the nearest byte.