Byte Converter

Type a size in any unit to see it in every other unit at once. The byte converter lists decimal (KB, MB, GB) and binary (KiB, MiB, GiB) values side by side.

Runs in your browser. Your data is not uploaded.

Decimal (SI, powers of 1,000)

Bytes
–
Kilobytes (KB)
–
Megabytes (MB)
–
Gigabytes (GB)
–
Terabytes (TB)
–
Petabytes (PB)
–

Binary (IEC, powers of 1,024)

Kibibytes (KiB)
–
Mebibytes (MiB)
–
Gibibytes (GiB)
–
Tebibytes (TiB)
–
Pebibytes (PiB)
–

Bits (1 byte = 8 bits)

Bits
–
Kilobits (Kb)
–
Megabits (Mb)
–
Gigabits (Gb)
–

How to use the Byte Converter

  1. Enter a Value. Decimals are allowed.
  2. Pick its Unit: bytes, an SI unit such as MB, a binary unit such as MiB, or a bit unit such as Mb.
  3. Press Convert. The decimal and binary tables fill in, with bit values underneath. Each value has its own copy button.

How it works

The value is first converted to bytes, then from bytes to every other unit.

SI unit      = 10^(3n) bytes
binary unit  = 2^(10n) bytes
bits         = bytes × 8
  • n: the step from bytes. 1 for KB and KiB, 2 for MB and MiB, 3 for GB and GiB, 4 for TB and TiB, 5 for PB and PiB.
  • SI units (KB, MB, GB): powers of 1,000, used by drive makers and macOS
  • Binary units (KiB, MiB, GiB): powers of 1,024, used for RAM and by Windows

The math uses exact decimal arithmetic, so sizes up to 10^18 bytes keep their precision. Results are shown with up to 10 significant digits.

Examples

  • 1 GB = 1,000,000,000 bytes = 0.9313225746 GiB.
  • 500 GiB = 536,870,912,000 bytes = 536.870912 GB.
  • 1 TB = 931.3225746 GiB = 0.9094947018 TiB.

Decimal and binary units side by side

Decimal unitBytesBinary unitBytes
1 KB1,0001 KiB1,024
1 MB1,000,0001 MiB1,048,576
1 GB1,000,000,0001 GiB1,073,741,824
1 TB1,000,000,000,0001 TiB1,099,511,627,776
1 PB1,000,000,000,000,0001 PiB1,125,899,906,842,624

The gap grows with each step: about 2.4% at the kilo level and almost 10% at the tera level. The binary prefixes (kibi, mebi, gibi) were introduced in 1998 to tell the two systems apart. Drive makers and macOS use decimal units. RAM and Windows use binary values, although Windows still labels them KB, MB, and GB.

Bytes to KB, MB, GB and TB

To convert a byte count, enter the number and choose Bytes (B) as the unit. The decimal table gives KB, MB, GB, and TB, and the binary table gives KiB, MiB, GiB, and TiB. Some sizes people look up often:

BytesDecimalBinary
1,0241.024 KB1 KiB
1,000,0001 MB0.9536743164 MiB
1,048,5761.048576 MB1 MiB
5,000,0005 MB4.768371582 MiB
1,000,000,0001 GB0.9313225746 GiB
1,073,741,8241.073741824 GB1 GiB
4,294,967,2964.294967296 GB4 GiB
1,000,000,000,0001 TB0.9094947018 TiB
2,000,000,000,0002 TB1.818989404 TiB

By hand, divide by 1,000 once for KB, twice for MB, three times for GB, and four times for TB. For the binary units, divide by 1,024 the same number of times.

Limitations

  • Negative values give an error.
  • Fractions of a byte are shown when the input produces them. For example, 1 bit is 0.125 bytes.
  • Values are rounded to 10 significant digits for display.
  • Some programs label binary units as "KB" or "GB". This converter always shows KiB and GiB for binary values.

Frequently asked questions

Is 1 KB 1,000 or 1,024 bytes?

In the SI standard, 1 KB is 1,000 bytes. 1,024 bytes is 1 KiB (kibibyte). Some operating systems still label KiB as "KB", which causes the confusion.

Why does my 1 TB drive show about 931 GB?

The maker counts 1 TB as 10^12 bytes. Windows divides by 1,024³ and shows 931 "GB", which are really GiB.

What is the difference between bits and bytes?

A byte is 8 bits. Storage is usually measured in bytes (MB) and network speed in bits (Mbps).

How do I convert bytes to GB?

Divide the byte count by 1,000,000,000 for GB, or by 1,073,741,824 for GiB. In the converter, enter the number, pick Bytes (B), and read both values from the tables.

Often used together with Byte Converter.