Byte size converter

Converts a data size into decimal and binary units at once — KB beside KiB, MB beside MiB — with bits, the exact byte count and what each OS reports.

Exact bytes
1,000,000,000,000
Decimal
Powers of 1000 — SI, drive manufacturers, macOS
  • B1,000,000,000,000
  • KB1,000,000,000
  • MB1,000,000
  • GB1,000
  • TB1
Binary
Powers of 1024 — IEC, Windows, RAM
  • KiB976,562,500
  • MiB953,674.3164
  • GiB931.3226
Bits
Powers of 1000 — network rates are always decimal
  • bit8,000,000,000,000
  • Kb8,000,000,000
  • Mb8,000,000
  • Gb8,000
  • Tb8
How your tools will report this

The same bytes, five readings. None is wrong; they disagree about the divisor, the label, or both.

  • Windows Explorer — divides by 1024, keeps the decimal labels931 GB
  • macOS Finder — divides by 10001 TB
  • ls -lh, du -h — divide by 1024932G
  • ls --si, du --si — divides by 10001.0T
  • Drive and USB makers — divide by 10001 TB

What this tool does

Type a size in any unit — 1 TB, 1536 MiB, 900 Mb, or just a raw number of bytes copied out of a file listing — and it comes back converted into both unit systems at the same time, along with the exact byte count and the way the tools on your machine will each report it.

The two systems are shown side by side rather than behind a toggle, because the whole difficulty of data sizes is that both are in use and both call themselves the same thing. A number on its own does not tell you which one produced it.

Why a kilobyte has two meanings

Computers address memory in powers of two, so 1024 is a natural round number to a machine in a way 1000 never will be. Early on, "kilo" was borrowed for 1024 because it was close enough to the SI thousand and nobody expected the two to drift apart. They drifted apart.

The error is small at the low end and compounds at every step. A kilobyte differs by 2.4%, a megabyte by 4.9%, a gigabyte by 7.4%, a terabyte by 10%. By the petabyte the two answers are 12.6% apart, which is no longer a rounding detail:

KB    1,000                 KiB    1,024                 # 2.4% apart
MB    1,000,000             MiB    1,048,576             # 4.9%
GB    1,000,000,000         GiB    1,073,741,824         # 7.4%
TB    1,000,000,000,000     TiB    1,099,511,627,776     # 10.0%

In 1998 the IEC gave the powers of 1024 their own names — kibibyte, mebibyte, gibibyte, and the KiB, MiB, GiB symbols — precisely so the ambiguity could be written away. The names never caught on in everyday use, but the symbols did, and anything labelled KiB is unambiguous. Anything labelled KB still is not.

Who counts which way

The split is not random. It falls roughly along the line between hardware that is addressed and hardware that is sold:

  • RAM is always binary. A 16 GB memory module is 16 GiB, because memory is addressed by binary rows and columns and could not be a round decimal number if it tried.
  • Drives are always decimal. A manufacturer selling a 1 TB disk means 1,000,000,000,000 bytes, and has since well before anyone complained about it.
  • Windows is binary but uses the decimal labels. It divides by 1024 and writes GB, which is where most of the confusion people actually experience comes from.
  • macOS has been decimal since Snow Leopard in 2009. The same drive that reads 931 GB on Windows reads 1 TB on a Mac, and neither machine is broken.
  • Linux command-line tools give you both: ls -lh and du -h divide by 1024, and the --si flag on the same commands divides by 1000.
  • Networking is always decimal, and counts bits rather than bytes.

The 1 TB drive that shows as 931 GB

This is the single most common question about data sizes, and the answer is that no space is missing. The drive holds exactly what the box said. Windows just divides those bytes by 1024 three times instead of by 1000, and then prints a label that says otherwise.

1,000,000,000,000 bytes         # what the manufacturer sold
/ 1024 = 976,562,500 KB         # Windows divides once
/ 1024 = 953,674.32 MB          # twice
/ 1024 = 931.32 GB              # three times, then labels it GB

The drive is not smaller than advertised and the operating system is not lying about the byte count. The only thing wrong is the label: what Windows calls 931 GB is really 931 GiB, and 931 GiB is 1 TB. Paste any size into this tool and the two columns show that relationship directly.

Bits and bytes, and the factor of eight

A byte is eight bits, and the two are distinguished in writing only by the case of a single letter: a capital B means bytes, a lowercase b means bits. Mb and MB differ by a factor of eight, which is more than enough to make a calculation nonsense.

This matters most for network speeds, which are quoted in bits per second while file sizes and download progress are in bytes. A 100 Mb/s connection moves at most 12.5 MB/s, so a 1 GB file takes about 80 seconds and not the 10 the numbers seem to promise. Nothing is throttling you; the units were never the same.

Bits are shown here only in the decimal system, and that is not a simplification. Network rates are defined in powers of ten, so a megabit is a million bits everywhere the term is used. The IEC does define binary bit units, but essentially nothing uses them, and offering them would invite a conversion nobody means.

Why the numbers here are exact

JavaScript numbers hold integers exactly only up to about 9 quadrillion — 2^53. An exabyte is 10^18, well past that, so a converter built on ordinary arithmetic starts losing digits precisely where large-storage questions live, and reports a byte count that is confidently wrong in its last few places.

Everything here uses arbitrary-precision integers instead. That also buys something less obvious: because every factor involved is a power of ten or a power of two, and both divide evenly into some power of ten, every conversion between these units terminates as a finite decimal. 1 TB is not approximately 931.32 GiB — it is 931.322574615478515625 GiB, with nothing left over. The rows here are rounded for reading, and the byte count above them is the whole answer.

Frequently asked questions

Is a kilobyte 1000 bytes or 1024 bytes?
Both, depending on who is counting. SI and drive manufacturers use 1000; Windows and RAM sizes use 1024. The IEC names the 1024 units separately — kibibyte, mebibyte, gibibyte — which removes the ambiguity, though the older labels are still everywhere. This tool shows both readings at once rather than choosing one.
Why does my 1 TB drive only show 931 GB?
Nothing is missing. The manufacturer sold you 1,000,000,000,000 bytes, counting in powers of 1000. Windows divides that by 1024 three times, gets 931.32, and then labels the result GB. Same bytes, different divisor, misleading label — what it is showing you is really 931 GiB.
What is the difference between MB and MiB?
A megabyte is 1,000,000 bytes and a mebibyte is 1,048,576 bytes, so MiB is about 4.9% larger. MiB is unambiguous by definition; MB is only unambiguous if you know which convention the tool that printed it follows.
Why is my download slower than my connection speed?
Usually because the two are measured in different units. Connection speeds are quoted in megabits per second and downloads in megabytes per second, and there are eight bits in a byte. A 100 Mb/s line tops out around 12.5 MB/s.
What does my hosting or upload limit of 25 MB actually mean?
It depends on the service, and the safe assumption is the smaller number. If the limit is enforced as 25 × 1,000,000 bytes, a file just under 25 MiB will be rejected. Converting your file size into both columns here shows immediately whether it clears both readings.
Can it handle very large sizes?
Yes. The arithmetic uses arbitrary-precision integers, so exabytes, zettabytes and yottabytes convert exactly rather than losing their last digits the way ordinary floating-point numbers do beyond 2^53.
Is anything I type sent to a server?
No. It is arithmetic in your browser; nothing is uploaded or logged, and it works with no network connection.