Loading...
Loading...
Convert bytes, KB, MB, GB, TB, and PB. Uses binary prefixes (1 KB = 1024 bytes) as used by operating systems.
The confusion around data sizes stems from two competing prefix systems. Hard drive manufacturers use decimal prefixes where 1 KB = 1,000 bytes, 1 MB = 1,000,000 bytes, and 1 TB = 1,000,000,000,000 bytes. Operating systems use binary prefixes where 1 KB = 1,024 bytes (2ยนโฐ), 1 MB = 1,048,576 bytes (2ยฒโฐ), and 1 TB = 1,099,511,627,776 bytes (2โดโฐ).
This is why a 1 TB hard drive shows as approximately 931 GB in Windows or macOS. The drive actually contains 1,000,000,000,000 bytes. Windows divides by 1,024 three times (for GB), arriving at about 931. Neither number is wrong; they use different definitions of "GB."
The IEC introduced unambiguous prefixes in 1998: kibibyte (KiB = 1,024 bytes), mebibyte (MiB = 1,048,576 bytes), gibibyte (GiB), tebibyte (TiB), and so on. Linux kernel documentation, some file systems, and technical standards use these binary prefixes to avoid ambiguity. Consumer software has been slower to adopt them.
This converter uses binary prefixes (1 KB = 1,024 bytes) to match what operating systems report, which is the most common use case when checking file sizes, RAM, or storage capacity in a system context.
API request and response sizes are often constrained by payload limits. AWS API Gateway has a 10 MB payload limit. Many mobile APIs target payloads under 100 KB to stay within a single TCP window. Knowing how many bytes a JSON object occupies, or whether a base64-encoded image fits within a limit, requires quick size arithmetic.
Bandwidth is often quoted in bits per second (bps), not bytes. A 100 Mbps network connection transfers 100,000,000 bits per second, which is 12.5 MB per second (dividing by 8 because 1 byte = 8 bits). Confusing megabits with megabytes is a common mistake when estimating download times or streaming requirements.
Why does my 1 TB drive show as 931 GB in Windows?
The drive contains 1,000,000,000,000 bytes (decimal). Windows reports storage in binary gigabytes where 1 GB = 1,073,741,824 bytes. Dividing 1,000,000,000,000 by 1,073,741,824 gives approximately 931.3. No data is missing; the same bytes are reported differently depending on which definition of GB is used.
What is the difference between a MB and a MiB?
MB (megabyte) is ambiguous: it can mean 1,000,000 bytes (decimal, used by storage vendors and network specs) or 1,048,576 bytes (binary, used by operating systems). MiB (mebibyte) always means exactly 1,048,576 bytes. Using MiB removes the ambiguity.
How many bytes is a petabyte?
In decimal, 1 PB = 10ยนโต bytes = 1,000,000,000,000,000 bytes. In binary (as used by operating systems), 1 PB = 2โตโฐ bytes = 1,125,899,906,842,624 bytes. Large-scale storage systems (data lakes, cloud archives) are now commonly measured in petabytes.