Bits to bytes converter
To convert bits to bytes, divide by 8. 8,000,000 bits is 1,000,000 bytes (1 MB), and a 256-bit value takes 32 bytes. This page converts amounts of data, not speeds.
1 b equals:
- b1
- kb0.001
- Mb0.000001
- Gb1E-9
- B0.125
- kB0.000125
- MB1.25E-7
- GB1.25E-10
- TB1.25E-13
- KiB0.00012207
- MiB1.19209E-7
- GiB1.16415E-10
Runs entirely in your browser. Nothing you type is sent anywhere.
Formula
1 b = 1 bits and 1 B = 8 bits, so:
Common conversions
| b | B |
|---|---|
| 8 b | 1 B |
| 16 b | 2 B |
| 32 b | 4 B |
| 64 b | 8 B |
| 128 b | 16 B |
| 256 b | 32 B |
| 1,000 b | 125 B |
| 8,000,000 b | 1,000,000 B |
Examples: where bit counts need to become bytes
- Keys and hashes. Security settings are described by bit length. A 128-bit value is 16 bytes and a 256-bit value is 32 bytes, which is what you allocate in a database column or buffer.
- Data volume from a meter. A monitoring tool reports that a device sent 4 Gb in a day. That is 0.5 GB (500 MB) of data, which is what counts against a data allowance.
- Protocol fields. Specifications often describe fields in bits: a 32-bit field is 4 bytes, a 48-bit field 6 bytes.
- A speed turned into a total. A link that carried 8,000,000,000 bits in total moved 1,000,000,000 bytes, which is 1 GB. The same division by 8 works at every prefix: Mb to MB, Gb to GB, Tb to TB.
Pitfall: Mb vs MB
A lower-case b is a bit and an upper-case B is a byte. "500 Mb" is 62.5 MB, not 500 MB, and confusing the two makes a figure eight times too large or too small. When someone writes a file size as Mb, check whether they meant megabits; in everyday speech they usually mean megabytes.
Binary units add a second trap: 8,388,608 bits is exactly 1 MiB (1,048,576 bytes) but 1.048576 MB. Pick the unit your source uses. To convert the other way, see bytes to bits. For speeds, where the same factor of 8 applies per second, use Mbps to bytes per second, and read bits vs bytes for why both units exist.
Frequently asked questions
How many bytes is 1,000 bits?
125 bytes. Divide the number of bits by 8.
How many MB is 1 Gb?
1 gigabit is 1,000,000,000 bits, which is 125,000,000 bytes, or 125 MB.
How many bytes is a 256-bit key?
32 bytes, because 256 ÷ 8 = 32.