Data Size Converter

Free data size converter: convert between bytes, KB, MB, GB, TB, and PB. Binary (1024-based) conversion for digital storage.

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent — no API key needed.

API docs
Enter a value to convert.

How data size converter works

This converter handles digital storage units using the binary standard, where each unit is 1024 times the previous one. One kilobyte (KB) equals 1024 bytes, one megabyte (MB) equals 1024 KB, one gigabyte (GB) equals 1024 MB, and so on through terabytes (TB) and petabytes (PB).

The binary convention (1024) is used by operating systems and most software. This differs from the decimal convention (1000) used by storage manufacturers, which is why a 500 GB hard drive shows as about 465 GB in your operating system. This converter uses the binary (1024) standard.

Enter a value, select the source unit, and the converter shows the equivalent in all other units simultaneously. Very large or very small results are shown in scientific notation for readability.

Frequently asked questions

How many bytes are in a kilobyte?
In the binary standard used by operating systems, one kilobyte (KB) equals 1024 bytes. Some manufacturers use a decimal standard where 1 KB = 1000 bytes, which is why hard drives show less capacity than advertised.
How do I convert MB to GB?
Divide the megabyte value by 1024. For example, 2048 MB / 1024 = 2 GB. The converter does this automatically when you select MB as the source unit.
What is the difference between MB and MiB?
MB traditionally means 1000000 bytes (decimal), while MiB (mebibyte) means 1048576 bytes (binary). In practice, most software uses MB to mean 1024^2 bytes. This converter uses the binary (1024) standard.
How many bytes are in a gigabyte?
In the binary standard, one gigabyte (GB) equals 1073741824 bytes (1024^3). One terabyte (TB) equals 1024 GB or 1099511627776 bytes.