Skip to main content

Byte Converter

Convert a size between bytes, KB, MB, GB, TB and PB at once.

Byte Converter
B1,048,576
KB1,024
MB1
GB9.765625e-4
TB9.536743e-7
PB9.313226e-10

💡 1 KB = 1,024 B / 1 MB = 1,024 KB / 1 GB = 1,024 MB

Uses 1024 like Windows, with a table of 1024 and 1000 values.

Enter a value in any unit and see it expressed in all of them at once, from bytes up to petabytes. Each step is a factor of 1024, the convention used by Windows, programming languages and command-line file listings. A table below gives common sizes under both 1024 and 1000.

Common sizes at a glance

KB, MB and GB can mean steps of 1,024 or steps of 1,000. Windows divides by 1,024 and still labels the result KB, MB and GB. macOS, iOS, Android (8.0 and later) and the capacity printed on drives and USB sticks use 1,000. The tool above uses 1,024.

MB to KB

MB KBsteps of 1,024 KBsteps of 1,000
1MB 1,024KB 1,000KB
2MB 2,048KB 2,000KB
3MB 3,072KB 3,000KB
5MB 5,120KB 5,000KB
10MB 10,240KB 10,000KB
20MB 20,480KB 20,000KB
25MB 25,600KB 25,000KB
50MB 51,200KB 50,000KB
100MB 102,400KB 100,000KB
200MB 204,800KB 200,000KB
500MB 512,000KB 500,000KB

GB to MB

GB MBsteps of 1,024 MBsteps of 1,000
1GB 1,024MB 1,000MB
2GB 2,048MB 2,000MB
3GB 3,072MB 3,000MB
4GB 4,096MB 4,000MB
5GB 5,120MB 5,000MB
8GB 8,192MB 8,000MB
10GB 10,240MB 10,000MB
16GB 16,384MB 16,000MB
20GB 20,480MB 20,000MB
32GB 32,768MB 32,000MB
50GB 51,200MB 50,000MB
64GB 65,536MB 64,000MB
100GB 102,400MB 100,000MB
128GB 131,072MB 128,000MB
256GB 262,144MB 256,000MB
512GB 524,288MB 512,000MB

TB to GB

TB GBsteps of 1,024 GBsteps of 1,000
1TB 1,024GB 1,000GB
2TB 2,048GB 2,000GB
4TB 4,096GB 4,000GB
8TB 8,192GB 8,000GB
10TB 10,240GB 10,000GB

KB to MB

KB MBsteps of 1,024 MBsteps of 1,000
100KB 0.0977MB 0.1MB
200KB 0.195MB 0.2MB
300KB 0.293MB 0.3MB
500KB 0.488MB 0.5MB
1,000KB 0.977MB 1MB
2,000KB 1.953MB 2MB
5,000KB 4.883MB 5MB

MB to GB

MB GBsteps of 1,024 GBsteps of 1,000
100MB 0.0977GB 0.1GB
500MB 0.488GB 0.5GB
1,000MB 0.977GB 1GB
2,000MB 1.953GB 2GB
5,000MB 4.883GB 5GB

Advertised drive capacity and what Windows shows

AdvertisedShown in Windows
128GB 119.21GB
256GB 238.42GB
512GB 476.84GB
1TB 931.32GB
2TB 1.82TB
4TB 3.64TB
8TB 7.28TB

Drives are sold in decimal units. 1 TB is 1,000,000,000,000 bytes, and Windows divides that by 1,024 three times to show about 931 GB. Nothing is missing.

Byte Converter: Features

Why 1024 and not 1000

Memory and addressing are organised in powers of two, so the sizes that matter to a computer fall naturally on multiples of 1024. The prefixes kilo, mega and giga were borrowed from the decimal system where they mean 1000, and the mismatch has caused confusion ever since. This tool uses 1024, because that is what the tools you are comparing against use: file managers, ls, df, language standard libraries and almost every developer-facing display.

The KB and KiB distinction

Standards bodies resolved the ambiguity by introducing separate binary prefixes: KiB, MiB and GiB explicitly mean 1024, 1024 squared and 1024 cubed, leaving KB, MB and GB to mean powers of 1000. Adoption has been uneven. Linux tooling and some file managers use the binary prefixes correctly; Windows displays 1024-based values while labelling them KB and MB; macOS switched to decimal units some years ago. The label alone does not tell you which convention a given number follows.

Why your drive looks smaller than advertised

This is the most familiar consequence. Drive manufacturers use decimal units, so a one terabyte drive holds a trillion bytes. An operating system that divides by 1024 three times reports that as roughly 931 gigabytes. Nothing is missing and nobody is cheating; the two numbers describe the same quantity under different conventions. The gap widens as capacity grows, from about 2.4 per cent at kilobytes to around 10 per cent at terabytes.

Where this matters in practice

Setting an upload limit, a request body cap or a log rotation threshold usually means writing a number of bytes in a configuration file while thinking in megabytes. Estimating what a table will occupy, or what a month of logs will cost to store, means multiplying a per-record size by a row count and then making the result legible. In both cases the conversion is trivial and the mistake of being out by a factor of 1024 is not.

Converting quantities other than bytes

The arithmetic runs in the page and nothing you type is transmitted, stored or logged. For converting other kinds of quantity, the Unit Converter handles length, weight, temperature, volume and more with the same instant-conversion approach.

Byte Converter: FAQ

Which convention should I use in my own software?

Be explicit and be consistent. Store sizes as a plain byte count, and choose one convention for display with a label that matches it: either KiB for 1024 or KB for 1000. The failure mode to avoid is computing in one convention and labelling in the other, which is what causes the confusion in the first place.

How large a value can it handle?

Up to petabytes, which covers any practical file or storage figure. Bear in mind that very large values expressed in bytes exceed what a double-precision number can represent exactly, so treat extremely large byte counts as approximate.

Are network speeds the same thing?

No, and this is a separate trap. Network throughput is quoted in bits per second, not bytes, and a byte is eight bits. A 100 Mbps connection transfers at most about 12.5 MB per second before overhead. Dividing by eight is the first step whenever you move between a link speed and a transfer time.

Does the tool round the results?

Values are shown with enough precision to be useful rather than truncated to whole units, so a size that is not an exact multiple remains recognisable. If you need an exact figure for a configuration file, use the byte value, which is always exact.

Can I paste a value with commas or a unit suffix?

Enter a plain number and choose the unit. Separators and suffixes vary by locale and by tool, so the input is kept deliberately simple to avoid guessing whether a period is a decimal point or a thousands separator.

Why does a file appear to take more space than its size?

Because filesystems allocate in blocks. A file of 100 bytes still occupies a whole block, commonly four kilobytes, so a directory of many tiny files consumes far more space than the sum of their sizes suggests. That is allocation overhead rather than a conversion error.

Is the value I enter sent to a server?

No. The conversion is arithmetic performed in your browser, and nothing you enter leaves the page.

How to Use Byte Converter

  1. Enter a value

    Type the number you want to convert. It can be a byte count from a configuration file, a size read from a file listing, or an estimate you are working out.

  2. Choose its unit

    Select the unit the value is currently in, from bytes up to petabytes. Every other unit updates at once, so there is no second step.

  3. Read the figure you need

    Take the byte value when writing a configuration limit, since it is always exact, and a larger unit when you need something legible for a document or a discussion.

Category Utilities