Data Size Converter
Instantly convert between data storage units: Bytes, KB, MB, GB, TB, and PB. Free online tool for developers and IT professionals.
Formula
Bytes = Value ร 1024โฟ โ Target = Bytes รท 1024แต (exponent: B=0, KB=1, MB=2, GB=3, TB=4, PB=5)
Every value is first normalised to bytes by multiplying by 1024 raised to the source unit's exponent, then divided by 1024 raised to the target unit's exponent. This converter uses the binary 1024 step used by operating systems and RAM, not the decimal 1000 step printed on drive packaging โ which is why a drive sold as 1 TB reports as roughly 0.91 TB in Windows.
Worked Examples
Example 1: Hard Drive Capacity
Problem:Convert a 500 GB drive to TB.
Solution:500 GB รท 1024 = 0.488 TB.
Result:0.488 TB
Example 2: File Upload Limit
Problem:Email limit is 25 MB. How many KB?
Solution:25 MB ร 1024 = 25,600 KB.
Result:25,600 KB
Example 3: Cloud Storage
Problem:Convert 2 TB to GB.
Solution:2 TB ร 1024 = 2,048 GB.
Result:2,048 GB
Frequently Asked Questions
How does the Data Size Converter work?
It converts your input value into bytes (the base unit) and then calculates the equivalent values for all other units (KB, MB, GB, TB, PB) using the standard binary conversion factor of 1024.
Why is RAM measured in binary but drives in decimal?
Because memory addressing is inherently binary. RAM is selected by address lines, and n address lines reach exactly 2^n locations, so a memory module can only be built in powers of two - 8 GiB, 16 GiB, 32 GiB. A hard drive or SSD has no such constraint; its capacity is whatever the platters or flash dies hold, so manufacturers use round decimal numbers. The two industries genuinely have different reasons for their conventions, which is why the mismatch has never been resolved.
Is my data secure?
Absolutely. All conversions happen directly in your browser using JavaScript. No data is ever sent to our servers.
What is the difference between KB and KiB?
KB (Kilobyte) is often used to mean 1000 bytes (decimal), while KiB (Kibibyte) strictly means 1024 bytes (binary). Data Size Converter uses the binary standard (1024) which is used by Windows and most operating systems.
How big is a GB in MB?
1 GB (Gigabyte) equals 1024 MB (Megabytes). If using the decimal standard (like hard drive manufacturers), it would be 1000 MB.
Why does my 1TB hard drive show as 931GB?
Manufacturers use decimal bytes (1 TB = 1,000,000,000,000 bytes). Windows calculates in binary (1 TB = 1,099,511,627,776 bytes). 1 trillion / 1.099 trillion โ 0.91, hence ~931 GB.
What is the largest unit supported?
We support up to PB (Petabytes). 1 PB = 1024 TB. This is enough to store over 500 billion pages of standard text.
How many bits are in a byte?
There are 8 bits in 1 byte. To convert storage size (bytes) to transfer speed (bits), multiply by 8.
How do I convert a connection speed into a download time?
Divide the bit rate by 8 to get bytes per second, then divide the file size by that. A 100 Mbps link delivers at most 100 / 8 = 12.5 MB per second, so a 5 GB decimal file takes 5,000 / 12.5 = 400 seconds, about 6 minutes 40 seconds. Note the unit trap: network speeds are quoted in decimal megabits while your file manager reports binary bytes, so mixing the two without converting inflates the estimate by roughly 7%.
Does macOS report sizes differently from Windows?
Yes, and this is the most common source of confusion when the same drive is checked on two machines. Windows calculates in binary but labels the result with decimal names, so a 1 TB drive shows as 931 GB. macOS switched to decimal reporting in Mac OS X 10.6 Snow Leopard, so the same drive shows as 1 TB. Neither is wrong - the bytes are identical and only the divisor differs.
Background & Theory
Data Unit Hierarchy (Binary 1024):
- 1 Byte (B) = 8 bits
- 1 Kilobyte (KB) = 1024 Bytes
- 1 Megabyte (MB) = 1024 KB
- 1 Gigabyte (GB) = 1024 MB
- 1 Terabyte (TB) = 1024 GB
- 1 Petabyte (PB) = 1024 TB
Why 1024?
Computers use binary (base 2) addressing. 2^10 is 1024, which is very close to 1000. It is computationally efficient for addressing memory in powers of 2.
Common Sizes:
- Text File: ~1-10 KB
- Photo: ~2-5 MB
- Song (MP3): ~3-10 MB
- Movie (HD): ~2-4 GB
- Game (AAA): ~50-100 GB
- Hard Drive: ~1-20 TB