Guide

How to Convert Between Bytes, KB, MB, GB and TB

Learn the binary (1024) vs decimal (1000) conventions for digital storage and how to convert between units accurately.

A data storage converter translates digital storage sizes between bits, bytes, kilobytes, megabytes, gigabytes, terabytes, and petabytes. The key gotcha is the convention: binary (1024) or decimal (1000).

Binary vs. decimal convention

Computers traditionally use binary units where each step multiplies by 1024: 1 KB = 1024 bytes, 1 MB = 1024 KB. Storage manufacturers often use decimal units where each step multiplies by 1000, which is why a "500 GB" hard drive shows fewer gigabytes in the operating system. The binary terms kibibyte (KiB), mebibyte (MiB) etc. were coined to remove the ambiguity.

Key conversion factors (binary)

  • 1 byte = 8 bits.
  • 1 KB = 1024 bytes; 1 MB = 1024 KB.
  • 1 GB = 1024 MB; 1 TB = 1024 GB.
  • 1 PB = 1024 TB.

How to use the converter

  1. Enter a value and choose its unit.
  2. Choose the target unit.
  3. Read the converted size.

Examples

5 GB = 5120 MB = 5,242,880 KB (binary). A 4.7 GB DVD holds about 4.37 GiB in binary terms — the gap is the convention difference, not lost capacity. A 50 MB email attachment is 0.0488 GB.

When a data storage converter is useful

  • Comparing file sizes and storage capacity.
  • Understanding why a drive shows less than its label.
  • Estimating how many files fit on a device.
  • Converting bandwidth or backup figures.

Put it into practice

Use the Data Storage Converter right now — free, in your browser, no sign-up required.

Try the Data Storage Converter