Format Code Now
/

Bytes Converter

CV-29

Type a size such as 1.5 GB or 512 MiB and see it in bits, bytes, decimal units (1000) and binary units (1024) at once. Each line shows which unit it was read as.

Runs in your browser. Nothing is uploaded.

Values, one per line

Converted

How to use it

  1. Type or paste one size per line, for example 1500000 B, 1 GiB or 100 Mb.
  2. Leave out the unit on a line to use the one chosen under "Unit when none is typed".
  3. Choose All units, or only one unit under Show, and set the significant digits.
  4. Press Convert, then copy the result or download it as a text file.

Decimal and binary units are different sizes

A kilobyte (kB) is 1000 bytes in the SI system. A kibibyte (KiB) is 1024 bytes, which is 2 to the 10th power. The gap grows with each step: a gigabyte (GB) is 1,000,000,000 bytes, while a gibibyte (GiB) is 1,073,741,824 bytes, about 7.4 percent more. The output is split into a decimal block and a binary block so you can see both. Pick the one that matches the source. A number from a storage label is usually decimal. A number from memory sizing is usually binary.

Bits versus bytes, and how case is read

A byte is 8 bits. A lowercase b means bit and a capital B means byte, so 100 Mb is 100 megabits and 100 MB is 100 megabytes, an eightfold difference. Network speeds are often quoted in bits and file sizes in bytes. This tool follows that convention for Kb, Mb and Gb. Plain lowercase kb, mb, gb and tb are read as bytes, and Tb and Pb with a capital T or P are bits. Each result line repeats the unit it was read as, in words, so a misread is easy to spot.

What the numbers are rounded to

The arithmetic is exact, using whole-number factors, so 1 GiB is exactly 1,073,741,824 B with no floating point error. Only the last step rounds, to the number of significant digits you choose (10 by default), half up, with trailing zeros removed. Very small or very large values switch to e-notation such as 1.5e-9. Negative sizes are rejected, and the tool does not convert transfer rates over time.

Error messages and what to do

MessageWhat it meansFix
Line 1: unknown unit "foo". Known units: bit, B, kB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB.The text after the number is not a unit this tool knows, so it cannot tell what the number measures.Use one of the units named in the message, or its full name, such as the spelled-out unit.
Line 1: could not find a number at the start of "abc". Write a value such as 12.5 km, or just 12.5.The line does not start with a number, so there is nothing to convert.Start each line with a value such as 12.5, with the unit after it if you want one.
Line 1: a size cannot be negative.A size cannot be below zero.Remove the minus sign.

Questions people ask

How many MB are in a GB?

In the decimal (SI) system, 1 GB is 1000 MB. In the binary system, 1 GiB is 1024 MiB. Type 1 GB and read the MB line, or type 1 GiB and read the MiB line, to see each one exactly.

What is the difference between MB and MiB?

MB is a megabyte, 1,000,000 bytes. MiB is a mebibyte, 1,048,576 bytes (1024 x 1024). The i marks the binary version defined by the IEC. The difference is about 4.9 percent at the mega level and grows at giga and tera.

Is Mb the same as MB?

No. Mb with a lowercase b is a megabit and MB with a capital B is a megabyte. One byte is 8 bits, so 8 Mb equals 1 MB. This converter reads the capital and lowercase b that way.

Why does my drive show less space than the label says?

Drive makers usually count in decimal units (1 GB = 1,000,000,000 bytes) while some software reports the same bytes in 1024-based units. Enter the label value in GB and read the GiB line to compare the two figures.

How do I convert bytes to bits?

Multiply by 8. Type 250 B and the bit line shows 2000 bit. Going the other way, divide by 8, or type 2000 bit and read the B line.

Does it convert download speed?

Not as a rate. It converts sizes only. To estimate a download time, convert the size and the speed to the same unit (for example megabits) and divide the size by the speed yourself.

About this tool

Shows every size in bits, bytes, decimal units (1 kB = 1000 B, as used on drive labels and by the SI) and binary units (1 KiB = 1024 B, the IEC names). Case matters for the letter b: b is a bit and B is a byte, so Mb is a megabit and MB is a megabyte. Lowercase kb, mb, gb, tb and pb are read as bytes; write Kb, Mb, Gb, Tb or Pb with a capital first letter for bits. Each line is echoed with the unit it was read as. Results are exact up to the chosen number of significant digits, rounded half up, with trailing zeros removed. Very large or very small results switch to e-notation. Negative sizes are rejected.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.