Common File Size Units
This converter supports commonly used units including:
- Bits (b)
- Bytes (B)
- Kilobytes (kB)
- Kibibytes (KiB)
- Megabytes (MB)
- Mebibytes (MiB)
- Gigabytes (GB)
- Gibibytes (GiB)
- Terabytes (TB)
When to Convert File Size Units
File Size conversion is useful for file storage, downloads, uploads, network data, cloud storage, backups, and software development. An online converter helps reduce manual calculation errors and makes it easier to compare values expressed in different units.
File Size Conversion Chart
File sizes can be expressed using either decimal (base-10) or binary (base-2) units. The convention used depends on the context and the software or hardware displaying the file size.
Binary file size units
- 1 Byte (B) = 8 Bits (b)
- 1 Byte (B) = 2 Nibbles
- 1 Kibibyte (KiB) = 1,024 Bytes (B)
- 1 Mebibyte (MiB) = 1,024 Kibibytes (KiB)
- 1 Gibibyte (GiB) = 1,024 Mebibytes (MiB)
- 1 Tebibyte (TiB) = 1,024 Gibibytes (GiB)
- 1 Pebibyte (PiB) = 1,024 Tebibytes (TiB)
- 1 Exbibyte (EiB) = 1,024 Pebibytes (PiB)
- 1 Zebibyte (ZiB) = 1,024 Exbibytes (EiB)
- 1 Yobibyte (YiB) = 1,024 Zebibytes (ZiB)
Strictly speaking, the binary units are KiB, MiB, GiB, TiB and PiB. For example, 1 MiB = 1,024 KiB = 1,048,576 bytes.
Decimal file size units
- 1 Kilobyte (kB) = 1,000 Bytes (B)
- 1 Megabyte (MB) = 1,000 Kilobytes (kB)
- 1 Gigabyte (GB) = 1,000 Megabytes (MB)
- 1 Terabyte (TB) = 1,000 Gigabytes (GB)
- 1 Petabyte (PB) = 1,000 Terabytes (TB)
- 1 Exabyte (EB) = 1,000 Petabytes (PB)
- 1 Zettabyte (ZB) = 1,000 Exabytes (EB)
- 1 Yottabyte (YB) = 1,000 Zettabytes (ZB)
Decimal units are commonly used by storage manufacturers when describing the capacity of drives and other storage devices.
How to Convert File Sizes
To convert file sizes correctly, first determine whether the source and target units are decimal or binary. Decimal units use factors of 1,000, while IEC binary units use factors of 1,024.
Converting Decimal Units
Decimal units include kB, MB, GB, TB, PB, EB, ZB, and YB.
- 1 MB = 1,000 kB
- 1 GB = 1,000 MB
- 1 TB = 1,000 GB
For example, 5 GB × 1,000 = 5,000 MB.
To convert in the opposite direction, 5,000 MB ÷ 1,000 = 5 GB.
Converting Binary Units
IEC binary units include KiB, MiB, GiB, TiB, PiB, EiB, ZiB, and YiB.
- 1 MiB = 1,024 KiB
- 1 GiB = 1,024 MiB
- 1 TiB = 1,024 GiB
For example, 5 GiB × 1,024 = 5,120 MiB.
To convert in the opposite direction, 5,120 MiB ÷ 1,024 = 5 GiB.
Converting Between Decimal and Binary Units
For conversions between the two systems, convert the original value to bytes and then divide by the number of bytes in the target unit.
For example, 1 GB = 1,000,000,000 B ÷ 1,048,576 = 953.674316 MiB.
File Size Conversion Examples
1 MB to kB
1 MB = 1,000 kB
1 MiB to KiB
1 MiB = 1,024 KiB
1 GB to MB
1 GB = 1,000 MB
1 GiB to MiB
1 GiB = 1,024 MiB
1 TB to GB
1 TB = 1,000 GB
1 TiB to GiB
1 TiB = 1,024 GiB
500 MB to GB
500 MB ÷ 1,000 = 0.5 GB
2 GB to MB
2 GB × 1,000 = 2,000 MB
File Size Conversion FAQ
What is the difference between decimal and binary file size units, and why are they often confused?
Decimal and binary units are two different systems for measuring digital information. Decimal units use powers of 1,000, while binary units use powers of 1,024. Confusion occurs because the same terms—especially kilobyte, megabyte, and gigabyte—were historically used for both systems.
What are decimal file size units?
Decimal file size units follow the International System of Units (SI). Each larger unit is exactly 1,000 times the preceding unit:
- 1 kB = 1,000 bytes
- 1 MB = 1,000 kB = 1,000,000 bytes
- 1 GB = 1,000 MB = 1,000,000,000 bytes
- 1 TB = 1,000 GB = 1,000,000,000,000 bytes
Decimal units are commonly used by storage-device manufacturers, network providers, data-transfer services, and telecommunications systems. The lowercase k is the correct SI symbol for kilo, so kilobyte is written as kB, not KB.
What are binary file size units?
Binary units use powers of two. Each larger binary unit is exactly 1,024 times the preceding unit:
- 1 KiB = 1,024 bytes
- 1 MiB = 1,024 KiB = 1,048,576 bytes
- 1 GiB = 1,024 MiB = 1,073,741,824 bytes
- 1 TiB = 1,024 GiB = 1,099,511,627,776 bytes
Binary units are useful when describing computer memory, operating-system values, binary address spaces, and other quantities naturally based on powers of two.
Where did the confusion come from?
Early computers used binary addressing, making powers such as 1,024, 1,048,576, and 1,073,741,824 especially convenient. Because 1,024 is close to 1,000, programmers informally borrowed the metric prefix kilo to describe 1,024 bytes. The same convention was later extended to megabytes and gigabytes.
As storage capacities increased, the difference between decimal and binary interpretations became more noticeable. A difference of 24 bytes at the kilobyte level becomes approximately 73.7 million bytes when comparing one decimal gigabyte with one gibibyte.
When were KiB, MiB, and GiB introduced?
The International Electrotechnical Commission introduced standardized binary prefixes in 1998. The terms kibibyte (KiB), mebibyte (MiB), and gibibyte (GiB) were created to distinguish binary quantities from the decimal SI units kB, MB, and GB. The letters “bi” indicate that the prefixes are binary.
Which definitions should be used today?
Under modern standards, SI prefixes refer strictly to powers of 1,000, while IEC binary prefixes identify powers of 1,024:
- kB, MB, GB, TB — decimal units based on powers of 1,000
- KiB, MiB, GiB, TiB — binary units based on powers of 1,024
Therefore, 1 GB = 1,000 MB and 1 GiB = 1,024 MiB. A gibibyte and a gigabyte are not the same quantity: 1 GiB = 1.073741824 GB.
Where is each system commonly used?
- Storage manufacturers: hard drives, SSDs, memory cards, and USB drives generally advertise decimal capacities.
- Computer memory: RAM capacities are commonly organized around binary powers, although GB is still frequently used in product descriptions.
- Operating systems: displayed units vary by operating system and software. Some use binary calculations with binary labels, while others use decimal calculations or retain traditional labels.
- Networking: network speeds normally use decimal units, such as Mb/s and Gb/s.
- Programming: developers may encounter both systems, depending on the API, file format, operating system, or application.
What are the most common mistakes?
- Assuming that 1 GB always equals 1,024 MB. Under the decimal standard, it equals 1,000 MB.
- Using MB when the intended unit is MiB.
- Comparing a manufacturer’s decimal storage capacity directly with an operating system’s binary capacity display.
- Confusing bits (b) with bytes (B). One byte contains eight bits.
- Writing kilobyte as KB when following strict SI notation. The SI symbol is kB; the binary symbol is KiB.
- Converting every unit by 1,024 without first determining whether the source and target units are decimal or binary.
How can conversion errors be avoided?
Check both the unit name and its symbol before converting. Use the exact byte definitions as the common base: convert the source value to bytes, then divide by the target unit’s byte value. This method works correctly for decimal-to-decimal, binary-to-binary, and decimal-to-binary conversions.
What are the IEC and SI notation systems?
The IEC is the International Electrotechnical Commission, an international standards organization covering electrical, electronic, and digital technologies. In 1998, the IEC introduced binary prefixes such as kibibyte, mebibyte, and gibibyte to distinguish powers of 1,024 from decimal units.
SI means the International System of Units, from the French name Système international d'unités. It is the internationally agreed measurement system used for units such as meters, kilograms, seconds, and amperes.
Learn more from the IEC guide to units and binary prefixes , the BIPM guide to SI prefixes , and NIST guidance on decimal and binary prefixes.