What it does
Converts a storage value between all the common units, while keeping decimal (SI) units and binary (IEC) units clearly separate — this is one of the most common sources of confusion in IT:
- Decimal / SI units (base 1000):
kB,MB,GB,TB,PB— used by hard drive manufacturers, network speeds, and the International System of Units. - Binary / IEC units (base 1024):
KiB,MiB,GiB,TiB,PiB— used by operating systems (Windows Explorer, macOS Finder, RAM specs...) to reflect how memory is actually addressed in powers of 2.
Mixing them up is why a "500 GB" hard drive shows up as roughly "465 GiB" in your file explorer — no storage is "missing", it's just two different definitions of "giga".
Try it
Reference table
| Unit | Name | Base | Value in bytes |
|---|---|---|---|
B | Byte | — | 1 |
kB | Kilobyte | 1000¹ | 1,000 |
MB | Megabyte | 1000² | 1,000,000 |
GB | Gigabyte | 1000³ | 1,000,000,000 |
TB | Terabyte | 1000⁴ | 1,000,000,000,000 |
PB | Petabyte | 1000⁵ | 1,000,000,000,000,000 |
KiB | Kibibyte | 1024¹ | 1,024 |
MiB | Mebibyte | 1024² | 1,048,576 |
GiB | Gibibyte | 1024³ | 1,073,741,824 |
TiB | Tebibyte | 1024⁴ | 1,099,511,627,776 |
PiB | Pebibyte | 1024⁵ | 1,125,899,906,842,624 |
How it works
- The input value is first converted to a raw byte count, using the exact base (1000 or 1024) for the selected source unit.
- That byte count is then re-expressed in every other unit, decimal and binary side by side, so you can immediately compare, e.g., how many
MiBcorrespond to500 MB. - All math uses plain JavaScript numbers; for extremely large values (beyond
Number.MAX_SAFE_INTEGER, around 9 × 10¹⁵ bytes / ~8 PiB), results are still shown but may lose some precision — a warning is displayed in that case.
The classic pitfall
> "Why does my 1 TB drive only show 931 GB in Windows?"
Manufacturers advertise storage using decimal terabytes (1 TB = 1,000,000,000,000 bytes), while Windows' file explorer reports size in binary units but mislabels them with decimal names (showing "GB" when it actually means GiB). So: