Data Size Converter — Bytes, KB, MB, GB, TB (SI & IEC)
Convert between bytes, KB, MB, GB, TB, PB and their IEC binary counterparts (KiB, MiB, GiB, TiB). Explains the SI vs IEC difference that causes 'my 1 TB drive shows 931 GB' confusion. 100% local.
Last updated:
CommentsSI (decimal, ×1000)
Used by hard-drive manufacturers, macOS Finder, network speeds.
| BBytes | 1,000,000,000 | |
| KBKilobytes | 1,000,000 | |
| MBMegabytes | 1,000 | |
| GBGigabytes | 1 | |
| TBTerabytes | 0.001 | |
| PBPetabytes | 1.000e-6 |
IEC (binary, ×1024)
Used by RAM specs, Windows, most programming languages.
| BBytes | 1,000,000,000 | |
| KiBKibibytes | 976,562.5 | |
| MiBMebibytes | 953.6743 | |
| GiBGibibytes | 0.931323 | |
| TiBTebibytes | 9.095e-4 | |
| PiBPebibytes | 8.882e-7 |
Frequently Asked Questions
Why does my 1 TB drive show as 931 GB in Windows?
Drive manufacturers use SI units (1 TB = 1,000,000,000,000 bytes). Windows and most operating systems display capacity in IEC binary units but still call them GB (technically GiB, 1 GiB = 1,073,741,824 bytes). 1 TB / 1024³ ≈ 931 GiB — same drive, different accounting.
What's the difference between KB and KiB?
KB (kilobyte, SI) = 1,000 bytes. KiB (kibibyte, IEC) = 1,024 bytes. IEC 80000-13 introduced the -bi- prefixes (kibi, mebi, gibi…) in 1998 so software can be explicit about ×1000 vs ×1024. RAM specs, most Linux tools, and older Windows use ×1024; disks, macOS Finder, and network bandwidth use ×1000.
Which one should I use in code?
Match the audience: user-facing storage labels usually use SI (matches the sticker on the drive), memory allocations and buffer sizes use IEC (matches how RAM is physically organized). Always name your variables and units to avoid ambiguity — 'bytes' as a plain number is safest.
Try Next
JSON → Python
Convert JSON to Python @dataclass definitions with typed fields. snake_case field names, nested classes, List[T] for arrays, and JSON-key alias comments. 100% local.
Related Tools
YAML → JSON
Convert YAML documents to JSON online. Supports YAML 1.2, multi-document streams, and produces pretty-printed JSON output.
JSON → CSV
Convert an array of JSON objects to CSV online. Headers are inferred automatically from all keys across records.
CSV → JSON
Convert CSV data to a JSON array of objects online. Auto-detects delimiter and quotes, preserves numeric types when requested.
Number Base
Convert numbers between binary, octal, decimal, and hexadecimal. Supports arbitrarily large integers using BigInt.
JSON → TypeScript
Convert JSON to TypeScript interfaces instantly. Generate strongly-typed TS types from any JSON sample.
JSON → Go
Convert JSON to Go structs online. Generates idiomatic Go structs with proper json tags and PascalCase field names.