Home › Unit Conversion › Data Storage Converter
Data Storage Converter
Converts digital storage and transfer sizes between bits, bytes, decimal SI multiples (KB = 1000 B, MB, GB, TB, PB), binary IEC multiples (KiB = 1024 B, MiB, GiB, TiB, PiB) and kilobit/megabit/gigabit/terabit.
When to use
You need a file, disk or memory size in another unit, e.g. GB to GiB, MB to bits or TB to GB, or want to explain why a '1 TB' drive shows as 931 GiB.
Do not use when: You need transfer time from size and bandwidth (use download-time) or a number in binary/hex (use base-converter).
Formula
result = value × factor, factor = (1 from_unit in B) / (1 to_unit in B)
KB/MB/GB/TB/PB follow the SI decimal prefixes (powers of 1000, as used by drive manufacturers and IEC 80000-13); KiB/MiB/GiB/TiB/PiB are binary (powers of 1024, as most operating systems report). 1 byte = 8 bits.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
value | number | yes | Amount to convert, expressed in from_unit. | |
from_unit | enum: bit | B | KB | MB | GB | TB | PB | KiB | MiB | GiB | TiB | PiB | kbit | Mbit | Gbit | Tbit | yes | Unit of the input value. Accepted symbols: bit, B, KB, MB, GB, TB, PB, KiB, MiB, GiB, TiB, PiB, kbit, Mbit, Gbit, Tbit; spelled-out names and common abbreviations are accepted too. | |
to_unit | enum: bit | B | KB | MB | GB | TB | PB | KiB | MiB | GiB | TiB | PiB | kbit | Mbit | Gbit | Tbit | yes | Unit to convert into (same symbols as from_unit). |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
result | number | Converted value expressed in to_unit (rounded to 6 decimals; see result_text for very small or very large values). | |
result_text | string | The conversion as text with 6 significant figures, e.g. "5 mi = 8.04672 km". | |
formula | string | Relation used, e.g. "1 mi = 1.609344 km". | |
factor | number | Multiplier from from_unit to to_unit (result = value × factor); absent for non-linear conversions. | |
conversion_table | object | The input value expressed in every supported data storage unit (6 significant figures), keyed by unit symbol. |
Example
1 GB to GiB: {"value":1,"from_unit":"GB","to_unit":"GiB"} → {"result":0.931323,"formula":"1 GB = 0.9313225746 GiB","conversion_table":{"MB":1000,"MiB":953.674,"bit":8000000000}}
500 MB to megabits: {"value":500,"from_unit":"MB","to_unit":"Mbit"} → {"result":4000,"factor":8,"conversion_table":{"GB":0.5,"MiB":476.837}}
GET https://tttkmbb.com/api/v1/calculate/data-storage?value=1&from_unit=GB&to_unit=GiB
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/data-storage(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/data-storage · Markdown: https://tttkmbb.com/conversion/data-storage.md · JSON definition: https://tttkmbb.com/conversion/data-storage.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="data-storage" - OpenAPI operationId:
convert_data_storage - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- NIST – Metric (SI) Prefixes (standard)
- Wikipedia – Binary prefix (IEC 80000-13 kibi/mebi/gibi) (reference)
- Wikipedia – Conversion of units (reference)
FAQ
Is 1 KB 1000 or 1024 bytes?
Here KB = 1000 bytes (SI) and KiB = 1024 bytes (IEC). Windows labels 1024-byte units as 'KB', which is why a 1 TB (10^12 B) drive shows as 931 GiB.
How do I enter megabits?
Use Mbit, kbit, Gbit or Tbit (or 'megabits'). Bandwidth figures such as 100 Mbps are megabits per second; divide by 8 for MB per second.
Related calculators
- Download Time Calculator — Time to transfer a file at a given bandwidth.
- Number Base Converter — Convert numbers between binary, decimal and hexadecimal.