Converters

Byte converter for bits, bytes, MB and MiB

This byte converter changes a quantity of data from one unit to another, such as megabytes to gigabytes or MiB to MB. It keeps decimal units, where 1 kB is 1000 bytes, apart from binary units, where 1 KiB is 1024 bytes. Results are exact unless you ask for rounding, and the conversion runs in your browser.

Convert a quantity

Enter a value and choose its input and output units.

Decimals, negatives and scientific notation (1e6) are supported. Use a decimal dot; omit commas and units.

Rounding uses the nearest value; halfway values round away from zero.

Loading the converter…

Result

Choose your units, then select Convert.

How to use the byte size converter

The page opens on 1 MiB to MB. Selecting Convert at once shows 1.048576 MB.

  1. Type the number in Quantity. Decimals, negative values and scientific notation such as 1e6 work. Use a dot for decimals and leave out commas and unit symbols.
  2. Pick the unit of that number in From and the unit you want in To. Each list has 38 units, from bits and bytes up to quettabytes. Swap units flips the two choices.
  3. Leave Output precision on Exact (no rounding), or choose Round to decimal places and set Decimal places. It starts at 6.
  4. Select Convert. The Result panel shows the answer, the full equation, a note on rounding and the same size in eight units under Other equivalent units.
  5. Select Copy result to copy the equation and the note. Download text saves byte-size-conversion.txt, which also holds those eight rows.

Cancel appears while a conversion runs and stops it. Reset brings back 1 MiB to MB. Any edit clears the old result.

Decimal and binary byte units

Decimal units step up by 1000 and binary units step up by 1024. So 1 kB (kilobyte) is 1000 bytes and 1 KiB (kibibyte) is 1024 bytes. One level up, 1 MB is 1,000,000 bytes and 1 MiB (mebibyte) is 1,048,576 bytes.

The gap grows with each prefix. 1 GiB (gibibyte) is 1.073741824 GB, about 7 percent more than a gigabyte. 1 TiB (tebibyte) is 1.099511627776 TB, almost 10 percent more than a terabyte.

The From and To lists run from kilo (k) to quetta (Q) for decimal units and from kibi (Ki) to yobi (Yi) for binary units. Each prefix comes as bytes (B) and as bits (bit). A byte is 8 bits, so 100 Mbit is 12.5 MB.

The lists have no KB entry. When a source writes KB, check whether it means 1000 or 1024 bytes, then pick kB or KiB.

Exact and rounded results

Exact output, the default, shows every digit, so 1 TB to GiB gives 931.322574615478515625 GiB. Round to decimal places rounds each value to the nearest one at the places you set. A value exactly halfway rounds away from zero, so 1 bit becomes 0.13 B at 2 places.

The converter reads your number as digits and works with arbitrary-size integers. Unit sizes use only the factors 2 and 5, so every result ends after a finite number of decimal places.

Large whole numbers stay exact as well. 9007199254740993 B converts to 72057594037927944 bit. A JavaScript number cannot hold 9007199254740993 and reads it as 9007199254740992.

A ≈ sign marks each rounded value in the equation and under Other equivalent units. The large answer above the equation has no sign. At 2 places, 1 TB to GiB gives the equation 1 TB ≈ 931.32 GiB, and the 1000.00 GB row has no mark.

The note under the answer says which case applies. Copy result and Download text keep that note.

Limits

The byte converter works on numbers you type. It does not measure or shrink a file. It has no rates per second, so it does not turn Mbps into MB/s or estimate a download time. It does not convert bytes to text, hexadecimal or byte arrays either.

The lists hold bits, bytes and their decimal and binary multiples, with no nibbles or words. Commas, fractions such as 1/2, unit symbols and spaces inside the number give an error.

Results come out in full, with no thousands separators or scientific notation. So 1 TB in bytes reads 1000000000000 B, and 1 bit is 0.000000000000000000000000125 YB.

The code sets no length limit, but the browser caps the size of the whole numbers it computes with. A huge exponent or Decimal places value can go past that cap, and the conversion then stops with "The conversion could not finish in this browser." Safari already fails at 1e320000. Chrome converts 1e320000 but fails at 1e400000000 after several seconds.

Questions

How many GB is 8192MB?

8192 MB is 8.192 GB, because 1 GB is 1000 MB. If the 8192 counts binary units, 8192 MiB is exactly 8 GiB, which is 8.589934592 GB. To check, type 8192 in Quantity, choose MB or MiB in From and GB or GiB in To, then select Convert.

What are the sizes of GB, MB, TB, and PB?

Each decimal step is 1000 times the one before. 1 MB is 1,000,000 bytes, 1 GB is 1000 MB, 1 TB is 1000 GB and 1 PB is 1000 TB. Converting 1 PB (petabyte) to B gives 1000000000000000 B, a 1 followed by 15 zeros. The binary units MiB, GiB, TiB and PiB step by 1024 instead.

How big is a byte size?

A byte is 8 bits. Converting 1 B to bit gives 8 bit, and 1 bit to B gives 0.125 B. Bigger sizes are multiples of the byte, such as 1 kB for 1000 bytes and 1 KiB for 1024 bytes. The largest unit here is the quettabyte (QB), a 1 followed by 30 zeros in bytes.

Which is bigger, MB or KB or bytes?

A megabyte is the biggest and a byte is the smallest. 1 MB is 1000 kB and 1 kB is 1000 bytes, so 1 MB is 1,000,000 bytes. In binary units 1 MiB is 1024 KiB, or 1,048,576 bytes. This byte converter writes the decimal kilobyte as kB and the binary one as KiB.

How many bytes are in a gigabyte?

A gigabyte (GB) is 1,000,000,000 bytes. A gibibyte (GiB) is 1,073,741,824 bytes, so 1 GiB is larger than 1 GB. A megabyte is 1,000,000 bytes and a mebibyte is 1,048,576 bytes. Convert 1 GiB to B, and the rows under Other equivalent units show 1024 MiB and 1.073741824 GB.

Is a kilobyte 1000 or 1024 bytes?

The decimal kilobyte (kB) is 1000 bytes and the binary kibibyte (KiB) is 1024 bytes. The From and To lists hold both. When a size limit says 500 KB, check which one it means. 500 kB is 500,000 bytes and 500 KiB is 512,000 bytes, so the binary reading allows 12,000 bytes more.

What is the order of byte units from smallest to largest?

From smallest to largest, the units run bit, byte, kilobyte, megabyte, gigabyte, terabyte, petabyte, exabyte, zettabyte, yottabyte, ronnabyte and quettabyte. A byte is 8 bits, and each step after it is 1000 times the one before. In the Result panel, the Other equivalent units table is a byte converter chart for one size in eight units.