Bits to bytes converter (and bytes to bits)

Divide bits by 8 to get bytes, and multiply bytes by 8 to get bits. A 256-bit key is 32 bytes, and 1 MB is 8,000,000 bits (8 Mb). This page converts amounts of data, not speeds.

Quick values
Quick units

Result
0.125 B

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
B = b ÷ 8 1 b ÷ 8 = 0.125 B

Runs entirely in your browser. Nothing you type is sent anywhere.

Formula

1 b = 1 bits and 1 B = 8 bits, so:

B = b ÷ 8 32 b ÷ 8 = 4 B

Common conversions

b → B

bB
8 b1 B
16 b2 B
32 b4 B
64 b8 B
128 b16 B
256 b32 B
1,000 b125 B
8,000,000 b1,000,000 B

B → b

Bb
1 B8 b
2 B16 b
4 B32 b
8 B64 b
64 B512 b
512 B4,096 b
1,024 B8,192 b
1,000,000 B8,000,000 b

Why storage counts bytes and networks count bits

A byte is the smallest unit most computers address: 8 bits, enough for 256 distinct values. Files, memory and disks are therefore sized in bytes (B, kB, MB, GB, TB). Networks move data one bit at a time down a wire or radio link, so line rates and plan speeds are counted in bits (kbps, Mbps, Gbps). Whenever a file size meets a link speed, one side has to be converted.

Examples in both directions

  • Bits to bytes: keys and hashes. 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. Protocol fields work the same way: a 48-bit field is 6 bytes.
  • Bits to bytes: a traffic meter. A monitoring tool reports that a device sent 4 Gb in a day. That is 0.5 GB (500 MB), the figure that counts against a data allowance.
  • Bytes to bits: a packet. A 64-byte frame is 512 bits. Network engineers quote frame sizes in bytes but link capacity in bits.
  • Bytes to bits: a photo upload. A 5 MB photo is 40 Mb, so a 20 Mbps upload sends it in 2 seconds at full speed.

Decimal vs binary: kB, KiB and memory sizes

Storage makers and network standards use decimal prefixes (steps of 1,000). Memory and many operating systems use binary prefixes (steps of 1,024), which the IEC names KiB, MiB and GiB. The bit counts differ accordingly:

UnitBytesBits
1 kB1,0008,000
1 KiB1,0248,192
1 MB1,000,0008,000,000
1 MiB1,048,5768,388,608
1 GB1,000,000,0008,000,000,000
1 GiB1,073,741,8248,589,934,592

This is why a drive sold as 1 TB (1,000,000,000,000 bytes) appears as about 931 GiB in an operating system that counts in 1,024s, often still labelled "GB". Memory is the opposite case: RAM is built in binary sizes, so a 16 GB module holds 16 GiB, or 17,179,869,184 bytes. Pick the binary unit in the converter whenever the source uses it; otherwise the answer is 2.4% off at the kilo scale and 7.4% off at the giga scale.

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. In everyday speech people usually mean megabytes, so check before you convert.

The same factor of 8 applies to speeds: Mbps to MB/s covers plans and download windows, kbps to Mbps covers bitrates, and the bytes to Mbps converter takes raw bytes per second. Bits vs bytes explains why both units exist.

Frequently asked questions

How many bits are in a byte?

8. That has been the standard size of a byte on practically all modern computers, which is why the conversion factor is always 8.

How many bytes is 1,000 bits?

125 bytes. Divide the number of bits by 8.

How many bits are in 1 MB?

8,000,000 bits (8 Mb) with the decimal megabyte. If the size is 1 MiB (1,048,576 bytes), it is 8,388,608 bits.

How many MB is 1 Gb?

1 gigabit is 1,000,000,000 bits, which is 125,000,000 bytes, or 125 MB.

Why is a file size shown in MB but my speed in Mbps?

Storage is organized in bytes and network links carry bits. Multiply the file size in MB by 8 to get megabits, then divide by the speed in Mbps to estimate the transfer time in seconds.

Related conversions

Related tools