Byte Converter

Byte converter that handles every common storage unit: KB, MB, GB, TB.

Convert Binary/decimal toggle 4 target units
Rate this calculator · 4.0 (2)

Bytes ↔ KB / MB / GB / TB

Binary or decimal base · IEC 80000-13 standard · bidirectional

Instructions — Byte Converter

1

Pick the target unit

Choose KB, MB, GB or TB from the dropdown. The conversion runs against the bytes field on the left. Default target is MB and default base is decimal.

2

Pick the base

Decimal (1,000) matches what drive makers, ISPs and the SI prefix system publish. Binary (1,024) matches what RAM makers, Windows, and many file systems report.

3

Enter a value

Type bytes on the left or the unit value on the right. The byte converter updates instantly. Precision is 4 decimal places, adjustable up to 10 for engineering work.

Drive label vs OS: a 1 TB drive contains 1012 bytes (decimal). Windows shows it as 931 GiB (binary). Same bytes, different unit.
RAM convention: “16 GB RAM” means 16 GiB = 234 bytes. Industry labels binary values as “GB” even though IEC 80000-13 reserves that symbol for decimal.

Formulas

One input, one base, one target. Bytes is the canonical unit; every larger prefix is a power of either 1,000 (decimal SI) or 1,024 (binary IEC) above the byte.

Decimal (SI prefixes)
$$ \text{unit} = \frac{B}{1000^n} $$
n is the position of the prefix: KB n=1, MB n=2, GB n=3, TB n=4. NIST and IEC reserve KB/MB/GB/TB for these decimal values.
Binary (IEC prefixes)
$$ \text{unit} = \frac{B}{1024^n} $$
The strict IEC symbols are KiB, MiB, GiB, TiB. They equal exactly 210, 220, 230, 240 bytes. Most operating systems still write “KB” even when they mean KiB.
Bytes to KB
$$ \text{KB} = \frac{B}{1000};\;\; \text{KiB} = \frac{B}{1024} $$
1 KB = 1,000 bytes (decimal). 1 KiB = 1,024 bytes (binary). The gap at the kilobyte level is 2.4%.
Bytes to MB
$$ \text{MB} = \frac{B}{10^6};\;\; \text{MiB} = \frac{B}{2^{20}} $$
1 MB = 1,000,000 bytes (decimal). 1 MiB = 1,048,576 bytes (binary). The gap widens to 4.86%.
Bytes to GB
$$ \text{GB} = \frac{B}{10^9};\;\; \text{GiB} = \frac{B}{2^{30}} $$
1 GB = 109 bytes. 1 GiB = 1,073,741,824 bytes. The gap is 7.37% — why a “1 TB” drive shows as 931 GiB.
Bytes to TB
$$ \text{TB} = \frac{B}{10^{12}};\;\; \text{TiB} = \frac{B}{2^{40}} $$
1 TB = 1012 bytes. 1 TiB = 240 bytes ≈ 1.0995 × 1012. The binary/decimal gap at the terabyte step is 9.95%.

Reference

Byte-to-unit reference (decimal SI)
BytesKBMBGBTB
1,0001.0000.00110-610-9
1,000,0001,0001.0000.00110-6
1,000,000,0001061,0001.0000.001
10121091061,0001.000
101510121091061,000 (= 1 PB)

Byte converter reference — binary (IEC)

Binary prefixes mean exact powers of 2, used by RAM, Windows file sizes, and the IEC 80000-13 standard.

Binary prefix values
PrefixBytes
1 KiB1,024
1 MiB1,048,576
1 GiB1,073,741,824
1 TiB1.0995 × 1012
1 PiB1.1259 × 1015
Common file sizes
FileTypical size
Plain text page2–10 KB
JPEG photo2–8 MB
MP3 song (3 min)3–5 MB
1080p movie (2 h)3–6 GB
4K movie (2 h)15–30 GB
Modern PC game50–150 GB

Note: the byte converter assumes the same base on both sides. To convert across bases (e.g., 1 GB decimal ↔ GiB binary), enter the byte count and read with the other base toggle.

Article — Byte Converter

Byte Converter: Bytes, KB, MB, GB, TB Explained

A byte converter translates raw byte counts into KB, MB, GB or TB. The two base systems are decimal (1 KB = 1,000 B, used by drive makers and ISPs) and binary (1 KiB = 1,024 B, used by RAM and Windows). The gap widens by about 7.4% per prefix step.

One byte is eight bits, the smallest unit most software exposes to a user. Above the byte, every prefix is a thousand-fold step in decimal SI or a 1,024-fold step in binary IEC. The byte converter on this page handles both bases through a single toggle.

What is a byte converter?

A byte converter is a small utility that scales a number of bytes up or down through standard prefixes. The most common targets are kilobytes, megabytes, gigabytes and terabytes. Every conversion is just division by 1,000 to the n-th power (decimal) or 1,024 to the n-th power (binary), where n is the prefix step: 1 for kilo, 2 for mega, 3 for giga, 4 for tera.

The byte converter exists because operating systems, networking, storage and memory have grown up with conflicting conventions. NIST formally defines KB, MB, GB and TB as decimal SI prefixes. IEC 80000-13 defines KiB, MiB, GiB and TiB as binary equivalents. Most consumer software ignores the IEC names and writes “GB” for both binary and decimal values.

Did you know

IEC introduced the kibi, mebi, gibi and tebi prefixes in 1998 to remove the long-running KB/MB/GB ambiguity. Most operating systems still ignore the new names: Windows displays binary values as “GB,” while macOS switched to decimal in 2009 but still uses “GB” rather than “GiB.”

Byte converter: binary vs decimal

Decimal prefixes are powers of 10. Binary prefixes are powers of 2. The mismatch is small at the kilobyte level (2.4%) and grows fast: at GB it is 7.37%, at TB it is 9.95%, at PB it is 12.6%. A byte converter that does not let you pick the base is a guess.

The 7.4% number is why a drive labelled 1 TB shows up as roughly 931 GB in Windows. The drive really contains 10 to the twelfth bytes; Windows divides by 2 to the thirtieth to display GB. Two correct answers, two different units. The byte converter shows both on demand.

Byte converter quick math
1 KB = 1,000 B 1 KiB = 1,024 B
1 MB = 10^6 B 1 MiB = 2^20 B
1 GB = 10^9 B 1 GiB = 2^30 B
1 TB = 10^12 B 1 TiB = 2^40 B

KB, MB, GB, TB through a byte converter

The four prefix steps cover almost every consumer scale. KB is for text files, configuration, small images. MB is for photos, audio tracks, single video clips. GB is for full albums, movies, applications, RAM modules, USB sticks. TB is for full drives, NAS units, multi-disc storage.

The byte converter handles all four through one target dropdown. A 5,000,000 byte file is 5 MB decimal or 4.768 MiB binary. A 2 billion byte file is 2 GB decimal or 1.863 GiB binary. The values diverge by exactly the 7.37% gap between 10 to the ninth and 2 to the thirtieth.

Watch the base toggle

Mixing bases produces nonsense answers. If you enter a binary GiB value into a byte converter set to decimal, your result will be off by 7.4%. Always check that the toggle matches what the source label uses.

Why a 1 TB drive shows as 931 GB in Windows

Drive manufacturers measure capacity in decimal SI bytes. A 1 TB drive contains 1,000,000,000,000 bytes — ten to the twelfth, exact to the rounding of the platter format. Windows interprets “GB” as gibibytes (2 to the thirtieth bytes) and divides accordingly: 10 to the twelfth divided by 2 to the thirtieth gives 931.32 GiB.

No bytes are missing. The drive’s decimal capacity is honest; Windows’ display unit is binary. A byte converter set to decimal returns 1,000 GB for the same drive, matching the label. macOS switched to decimal display in Mac OS X 10.6, so a Mac and Windows machine reading the same drive show different numbers.

Drive label (decimal)
1,000 GB
10^12 bytes
Windows display (binary)
931.3 GiB
10^12 / 2^30

Byte converter for real file sizes

The byte converter is most useful when reading a raw byte count out of file properties, an API response, or a network log. A plain-text page of a thousand words runs about 5 to 8 KB. A typical 12 MP smartphone photo is 3 to 5 MB. An MP3 at 192 kbps for a three-minute song is roughly 4.3 MB.

Video sizes scale faster. A two-hour 1080p H.264 movie at 8 Mbps comes to about 7.2 GB. The same film at 4K H.265 (HEVC) at 25 Mbps is around 22 GB. A modern AAA game install runs 60 to 150 GB, sometimes 200 GB once patches and high-resolution texture packs land. The byte converter lets you size every one of these against your free disk space at a glance.

  • 1 KB ≈ one paragraph of plain text (about 1,000 characters)
  • 1 MB ≈ a high-resolution JPEG, or roughly 60 seconds of MP3
  • 1 GB ≈ a feature-length DVD-quality movie, or ~250 average songs
  • 1 TB ≈ 200 hours of 4K video, or 250,000 photos
  • 1 PB ≈ 1.5 million CDs worth of audio

IEC binary prefixes: KiB, MiB, GiB

In 1998 the IEC published the IEC 60027-2 amendment (later absorbed into IEC 80000-13:2008) that introduced binary prefixes: kibi (Ki), mebi (Mi), gibi (Gi), tebi (Ti), pebi (Pi), exbi (Ei). Each is exactly the corresponding power of 1,024. The intent was simple: free up the metric prefixes for their proper decimal meaning and give binary values their own names.

Adoption has been partial. Linux distributions, Python and most scientific computing use IEC binary prefixes. Windows, Android, and most consumer storage labels still use the older convention. A byte converter that exposes both bases keeps you honest no matter what convention your source uses.

Tip

When writing technical documentation, use the IEC binary prefixes (KiB, MiB, GiB) for memory and OS-reported file sizes, and stick with decimal SI prefixes (KB, MB, GB) for drive capacity, network throughput, and anything from a hardware data sheet. The byte converter can render either.

Byte converter mistakes to avoid

The single biggest mistake is mixing bases. Treating 1,024 MB as 1 GB inside a decimal context produces a 2.4% error per prefix step. The error compounds: if you treat 1,024 MB as 1 GB and then 1,024 GB as 1 TB, your total is 4.9% off.

The second mistake is confusing bits and bytes. Network speeds are quoted in bits per second (Mbps, Gbps). Storage is quoted in bytes. A “1 Gbps” fibre line moves 125 MB per second, not 1,024 MB. A byte converter does not convert bits to bytes; divide bits by 8 first.

FAQ

Decimal: 1 KB = 1,000 bytes (SI prefix, used by drive manufacturers and the byte converter when set to decimal). Binary: 1 KiB = 1,024 bytes (IEC 80000-13, used by Windows and RAM).
Decimal: 1 MB = 1,000,000 bytes (106). Binary: 1 MiB = 1,048,576 bytes (220). The gap is 4.86%.
Decimal: 1 GB = 1,000,000,000 bytes (109). Binary: 1 GiB = 1,073,741,824 bytes (230). The 7.37% gap explains why a “1 TB” drive label shows as 931 GiB in Windows.
The drive really contains 1012 bytes — the manufacturer’s label is honest decimal TB. Windows divides by 230 to display GB and gets 1,000,000,000,000 ÷ 1,073,741,824 = 931.32 GiB. No bytes are missing; the byte converter shows both numbers depending on the base toggle.
KB is the decimal kilobyte (1,000 bytes). KiB is the binary kibibyte (1,024 bytes), defined by IEC 80000-13 in 1998. The byte converter labels them “Decimal” and “Binary” via the base toggle to avoid confusion.
Use decimal for storage drives, SSDs, USB sticks, cloud storage capacity, ISP bandwidth, and any spec sheet that lists bytes. Use binary for RAM, Windows file sizes, and most operating system reports. macOS and iOS have used decimal since 2009.
1 PB (petabyte, decimal) = 1015 bytes = 1,000 TB. 1 PiB (pebibyte, binary) = 250 bytes ≈ 1.126 × 1015. A single PB holds about 250,000 HD movies or every Wikipedia article in every language, several times over.
Yes. The byte converter accepts any positive integer up to JavaScript’s safe integer limit (253 − 1, about 9 PB). For larger values, use scientific notation in the input field (e.g., 1e18 for 1 EB).