Data Size Converter

Convert between bytes, KB, MB, GB, TB and PB, with decimal and binary shown separately instead of conflated.

From unit
Your number is

How to use

  1. Type a size and choose which From unit it's in.
  2. Under Your number is, say whether the size you typed is Decimal (1000) or Binary (1024) (see the FAQ if you're not sure).
  3. The table shows every unit, bytes through petabytes plus bits, with decimal and binary side by side, so 1.5 GB and 1.4 GiB sit next to each other. The unit you would normally say it in is highlighted in each column.
  4. Click any value to copy just that one, with its unit.

Two different "gigabytes", both correct

A gigabyte means two different numbers of bytes depending who's counting: storage manufacturers, network speeds and most marketing use decimal (1 GB = 10003 bytes, matching the metric prefix "giga"), while operating systems, RAM capacity and file managers usually mean binary (1 GiB = 10243bytes, the correct unit is GiB, though "GB" gets used for it constantly). Neither is wrong; picking the wrong one for the number you already have is what produces a mismatch. This tool keeps the two separate instead of quietly picking one.

Example

1 TB (decimal) is:

1,000,000,000,000 bytes
1,000 GB
8,000,000,000,000 bits

The same number of bytes read as binary (TiB) instead:

1,024 GiB (1 TiB = 1024 GiB, so 1 decimal TB is slightly less than 1 binary TiB)

Options explained

Edge cases and common errors

Do the same thing in code

// JavaScript: decimal
const gb = bytes / 1000 ** 3;
// JavaScript: binary (the correct unit is GiB, not GB)
const gib = bytes / 1024 ** 3;

# Python: same distinction
gb = bytes / 1000 ** 3
gib = bytes / 1024 ** 3

Working with a raw timestamp or date instead of a size? The Unix Timestamp Converterand Date Difference Calculator handle those the same "show every honest interpretation" way.

Data Size Converter FAQ

Why does my 1 TB hard drive show as only 931 GB in Windows?

Manufacturers advertise storage in decimal terabytes (1 TB = 1,000,000,000,000 bytes, the "Decimal" mode here), but Windows reports free space in binary gibibytes while still calling them "GB" (1 GiB = 1,073,741,824 bytes). The same 1,000,000,000,000 bytes reads as 1,000 GB in decimal but only 931.323 GiB in binary: nothing is missing, it's the same number of bytes measured against two different definitions of "giga".

Which one should I use, decimal or binary?

Decimal (1000-based) is what storage manufacturers, network speeds and most marketing use. Binary (1024-based) is what operating systems, RAM and file managers usually display, and the technically correct meaning of KiB/MiB/GiB. If a number you were given doesn't match what this tool shows, try the other base before assuming either is wrong.

What is the difference between MB and Mb (or MB/s and Mbps)?

Capital B is bytes, lowercase b is bits. There are 8 bits in a byte. An internet plan advertised as "100 Mbps" (100 megabits per second) downloads at about 12,500,000 bytes per second, roughly 12.5 MB/s, not 100 MB/s, which is 8 times faster. This tool always shows both bytes and bits side by side for exactly this mix-up.

Does this handle fractional sizes, like 2.5 GB?

Yes. Any decimal number is accepted, not just whole numbers. Negative sizes and non-numeric text are refused, since neither means anything as a data size.

Runs entirely in your browser: this page is a static file with no server behind it, so nothing you paste can be uploaded. Last reviewed by Parthesh Gupta. Implements IEC 80000-13 (binary prefixes: KiB, MiB, GiB…).