🖥️ Binary Size Formatter – IEC & SI Unit Converter Explained
The Binary Size Formatter converts any file size, storage capacity, or data-transfer value into every common unit simultaneously — from bits all the way to yottabytes. It supports both IEC binary (KiB, MiB, GiB…) and SI decimal (KB, MB, GB…) standards, making it indispensable for developers, sysadmins, students, and anyone who needs to reconcile operating-system displays with advertised storage specs.
📐 IEC vs SI: Why Two Standards Exist
The confusion between kilobyte and kibibyte dates back to the early days of computing, when "kilo" was informally borrowed from the metric system and applied to powers of two. In 1998, the International Electrotechnical Commission (IEC) standardised the Ki/Mi/Gi prefixes to eliminate ambiguity:
| Name | IEC Symbol | IEC Bytes | SI Symbol | SI Bytes |
|---|---|---|---|---|
| Kilobyte / Kibibyte | KiB | 1,024 | KB | 1,000 |
| Megabyte / Mebibyte | MiB | 1,048,576 | MB | 1,000,000 |
| Gigabyte / Gibibyte | GiB | 1,073,741,824 | GB | 1,000,000,000 |
| Terabyte / Tebibyte | TiB | 1,099,511,627,776 | TB | 1,000,000,000,000 |
| Petabyte / Pebibyte | PiB | 1,125,899,906,842,624 | PB | 1,000,000,000,000,000 |
Today, Linux and macOS report file sizes in IEC units (GiB), while storage manufacturers advertise capacity in SI units (GB). This is why a 1 TB SSD appears as only ~931 GiB in Disk Utility — nothing is missing, it is a difference in measurement convention.
⚙️ How the Conversion Works
Every conversion starts by reducing the input to a raw byte count. From there, the formatter divides by each unit's factor to produce all tier values at once:
IEC tier = floor(log₂(bytes) / 10)
IEC value = bytes ÷ 1024^tier
SI tier = floor(log₁₀(bytes) / 3)
SI value = bytes ÷ 1000^tier
Bits ↔ Bytes = bytes × 8 (or ÷ 8)
The best-fit result automatically picks the largest unit where the formatted number is still ≥ 1, keeping the output compact and readable. You can adjust decimal precision from 0 to 10 places for documentation, logging, or rough estimates.
📊 Reading the Full Breakdown Table
The All Units tab lists every tier from bits to yottabytes in a single scrollable table. Each row shows the value in that unit and its standard (IEC or SI). The best-fit row is highlighted with a badge so you can spot it instantly. Switch between IEC Units and SI Units tabs for focused views.
🔗 Practical Use Cases
- Developers — quickly verify whether a log file exceeds a 50 MiB limit or confirm that an API payload is under a 10 MB threshold.
- Sysadmins — reconcile
df -houtput (GiB) with storage purchase orders (GB) without manual arithmetic. - Students — learn the IEC/SI distinction hands-on with live examples and the step-by-step division chain.
- Network engineers — convert Mbps (megabits) to MiB/s (mebibytes per second) by selecting "Bits" as the input unit.
🎓 The Step-by-Step Division Chain
Expand the Step-by-Step IEC Division Chain panel to see every division stage — for example, how 1,073,741,824 bytes becomes 1,048,576 KiB, then 1,024 MiB, then finally 1.00 GiB. This walkthrough is ideal for exam preparation or debugging unexpected size readings in monitoring dashboards.
💡 Tips & Common Pitfalls
- RAM is always IEC — a "16 GB" RAM module contains exactly 16 GiB (16 × 2³⁰ bytes) because memory chips are manufactured in exact powers of two.
- Hard drives use SI — a "2 TB" drive holds 2 × 10¹² bytes, which your OS may display as ~1.82 TiB.
- Network speeds are in bits — a 1 Gbps connection transfers 125 MB/s (SI) or ~119.2 MiB/s (IEC). Use the Bits input unit to see both.
- Precision matters at scale — at petabyte scale, the difference between IEC and SI approaches 12.6 %, which can significantly affect billing calculations.