Back Conversion

Byte Converter

Convert between data size units instantly. Supports both decimal (SI) units like KB, MB, GB and binary (IEC) units like KiB, MiB, GiB. Click any value to copy it.

Last updated: May 2026 · Reviewed by FreeDevTool systems engineering team
Copied!

KB vs KiB — the binary / decimal split, the storage industry's lawsuit history, and why it still matters

Computer storage has two coexisting unit systems that look almost identical and differ by ~7%. The split has been the subject of class-action lawsuits against drive manufacturers, design changes in macOS, and a still-unfinished standardization effort that started in 1998. This guide breaks down the SI / IEC distinction, the practical numbers you need to remember, the operating system that displays each variant, and the network-vs-storage convention split that bites every backend engineer.

The two systems — SI vs IEC

SI (decimal, base 10)BytesIEC (binary, base 2)Bytes
kilobyte (KB)1 000 (10³)kibibyte (KiB)1 024 (2¹⁰)
megabyte (MB)1 000 000 (10⁶)mebibyte (MiB)1 048 576 (2²⁰)
gigabyte (GB)10⁹gibibyte (GiB)2³⁰ ≈ 1.074 × 10⁹
terabyte (TB)10¹²tebibyte (TiB)2⁴⁰ ≈ 1.100 × 10¹²
petabyte (PB)10¹⁵pebibyte (PiB)2⁵⁰ ≈ 1.126 × 10¹⁵

The drift is exponential: KB and KiB differ by 2.4%, MB and MiB by 4.9%, GB and GiB by 7.4%, TB and TiB by ~10%. The bigger the unit, the bigger the gap. A 1 TB drive (1,000,000,000,000 bytes) is reported as ~931 GiB by Windows.

Who shows what

SystemDefault displayNotes
Windows (Explorer)Binary, but labels "GB"Reports 1 GiB and calls it 1 GB. The single biggest cause of confusion.
macOS (Finder, since 10.6 Snow Leopard)Decimal SI1 GB = 10⁹ bytes. Matches drive vendor numbers.
Linux (most distros)Mixed; du -h uses binary, du -h --si uses decimalCoreutils respects POSIXLY_CORRECT env var.
iOS / Android (Settings → Storage)Decimal SIAligns with Apple/Samsung marketing copy.
Drive / RAM manufacturersDecimal for drives, binary for RAMRAM is sized in powers of 2 (8 GiB, 16 GiB) but labeled "GB".
Cloud storage (S3, GCS, Azure)Decimal SI for billing1 TB egress means 10¹² bytes, not 2⁴⁰.
Network (bandwidth)Decimal SI, in bits, not bytes"1 Gbps" = 10⁹ bits/s = 125 MB/s decimal.

The lawsuit history — why drive vendors switched

Through the 1990s, hard-drive vendors freely mixed decimal and binary in marketing. After multiple US class-action suits (notably Cho v. Seagate, 2007), the industry standardized on decimal SI for capacity claims and added explicit fine print. This is also why Apple changed Finder in macOS 10.6 (2009) to display decimal — to match what users see on the box.

Windows still shows binary with "GB" labels (technically wrong by IEC standards) for backward compatibility. Microsoft has acknowledged the issue but has never changed it.

Bits vs bytes — network bandwidth confusion

Networking has always used bits, storage has always used bytes. 1 byte = 8 bits, so a "1 Gbps" connection delivers 125 MB/s in decimal terms — never 1 GB/s. The distinction matters every time someone says "I have a 1 Gig connection but my download speed is only 100 MB/s":

The "MB" in "100 MB/s download speed" you see in browsers is decimal MB (10⁶ bytes). The "MB" in "1 GB RAM" is binary MiB (2²⁰ bytes). Same letters, different meanings, no warning.

Common storage benchmarks — actual byte counts

ItemBytesDecimal (SI)Binary (IEC)
Tweet (280 chars UTF-8)~280–840
Average web page (HTML, 2025)~75 00075 KB~73 KiB
HD photo (JPEG, 4K)~3 000 0003 MB~2.86 MiB
MP3 song (3 min, 320 kbps)~7 200 0007.2 MB~6.87 MiB
HD movie (1 hour, H.264)~1.4 × 10⁹1.4 GB~1.30 GiB
4K UHD movie (2 hours)~50 × 10⁹50 GB~46.6 GiB
Wikipedia text dump (English, 2026)~22 × 10⁹22 GB~20.5 GiB
Netflix's video library (estimate)~3 × 10¹⁵3 PB~2.66 PiB

Programming language conventions

Language / APIWhat "1 MB" means
Java 1_000_000LDecimal — explicit literal.
Java FileUtils.byteCountToDisplaySizeBinary (KB = 1024) — Apache Commons treats KB as KiB.
Node.js fs.statSync(file).sizeReturns bytes; conversion is your job.
Python os.path.getsizeReturns bytes.
Linux du -BMBinary mebibytes; du --si -BM for decimal.
AWS S3 Content-LengthBytes; AWS billing uses decimal GB.
Docker docker statsMixed historically; recent versions use binary KiB/MiB consistently.

Common byte-conversion mistakes

Frequently Asked Questions

What is the difference between KB and KiB (binary vs decimal)?
KB (kilobyte) uses the SI decimal standard: 1 KB = 1,000 bytes. KiB (kibibyte) uses the IEC binary standard: 1 KiB = 1,024 bytes. The distinction matters because storage manufacturers use decimal (making drives appear larger), while operating systems traditionally use binary (showing less usable space). The IEC introduced binary prefixes (KiB, MiB, GiB) in 1998 to eliminate this confusion.
How many bytes are in a gigabyte?
In decimal (SI): 1 GB = 1,000,000,000 bytes (109). In binary (IEC): 1 GiB = 1,073,741,824 bytes (230). The difference is about 7.4%. For a 500 GB hard drive, that translates to roughly 35 GB of apparent "missing" space when your OS reports in GiB.
Why does my hard drive show less space than advertised?
Drive manufacturers measure in decimal gigabytes (1 GB = 1 billion bytes) because it yields larger numbers for marketing. Windows displays sizes in binary gibibytes (1 GiB = 1,073,741,824 bytes). So a 1 TB drive (1,000,000,000,000 bytes) shows as ~931 GiB in Windows. macOS switched to decimal display in 2009, so Macs show the advertised capacity.

Browse all 50 free developer tools

All tools run in your browser, no signup required, nothing sent to a server.