File Size Converter
SI, IEC and the exact byte count at the same time — both directions, live. 1 GB is 1,000,000,000 bytes; 1,073,741,824 bytes is 1 GiB.
1 Size or byte count
—
Type a size with a unit (1.5 GiB, 700 MB, 4096) and it resolves to bytes; type a bare byte count and it resolves to both ladders. Commas are fine — paste straight out of a file manager. Everything updates as you type; there is no Generate button.
Exact byte counts, for reference
| SI | bytes | IEC | bytes |
|---|---|---|---|
| 1 kB | 1,000 | 1 KiB | 1,024 |
| 1 MB | 1,000,000 | 1 MiB | 1,048,576 |
| 1 GB | 1,000,000,000 | 1 GiB | 1,073,741,824 |
| 1 TB | 1,000,000,000,000 | 1 TiB | 1,099,511,627,776 |
All figures in bytes. These four pairs cover nearly every size anyone argues about — and the giga row is the one the arguments are usually about.
2 The same size, three ways
SI — decimal prefixes
base 1000IEC — binary prefixes
base 1024Bytes
the number to quoteBoth ladders, every step
The same size written out on every step of both ladders.
| Step | SI (÷1000n) | IEC (÷1024n) | Gap |
|---|
The arithmetic runs in this tab — nothing you type is uploaded, and nothing is stored. The converter is bytes-core.js, a port of the MIT-licensed @verifyhash/bytesize package pinned by this repository's own golden-vector suite against that package's published tests; it contains no fetch and no XMLHttpRequest, so there is no code path that could send a number anywhere. The page does load one cookieless pageview counter from stats.dankdev.com, which records this page’s address and title and nothing you type. A shared link carries only the size text you typed and the two picker settings, in the address itself.
The two ladders, and who defines each one
Every claim below is a definition published by a standards body, so you can check it rather than take it from a web page. What this page will not tell you is what any particular operating system, file manager or storage vendor does with these labels — that varies, it changes between versions, and guessing on your behalf would be worse than useless.
SI prefixes — powers of 1000
1 kB = 1,000 BKilo is 103. The SI symbol is a lowercasek; capital K is the kelvin.1 MB = 1,000,000 BMega, 106.1 GB = 1,000,000,000 BGiga, 109. This is the number the SI prefix commits you to.1 TB = 1012 BTera. One more factor of a thousand, and the gap with its binary twin reaches 9.95%.- Defined by the BIPMThe SI prefixes are maintained in the SI Brochure, and they are decimal by construction — there is no reading of “giga” in SI that gives 1,073,741,824.
IEC binary prefixes — powers of 1024
1 KiB = 1,024 BKibi, 210. SymbolKi— the first two letters of “kilo” plus bi for binary.1 MiB = 1,048,576 BMebi, 220.1 GiB = 1,073,741,824 BGibi, 230. This is the other number people mean when they say “GB”.1 TiB = 240 BTebi, 1,099,511,627,776 bytes.- Published by the IEC in 1999Amendment 2 to IEC 60027-2, now carried in IEC 80000-13:2008 — quantities and units for information science and technology.
Why one word ended up meaning two numbers
Memory is addressed with binary addresses, so the quantities that fall out of a memory chip are powers of two: 1024, 65536, 1048576. When those quantities needed names, the nearest decimal prefix was borrowed — 1024 was close enough to a thousand to be called a kilobyte, and the 2.4% error did not matter. It compounds, though. At mega the two readings differ by 4.86%, at giga by 7.37%, at tera by 9.95%, and by peta you are arguing about an eighth of the total. The gap is (1024/1000)n - 1, and every rung you climb it gets worse.
In 1999 the IEC ended the ambiguity by naming the binary quantities properly: kibi, mebi, gibi, tebi, with the symbols KiB, MiB, GiB, TiB. The standard is settled. The usage is not, because decades of software, documentation and habit predate it. So the practical rule is the one this page is built around: a prefix is a guess, a byte count is a fact. When a number has to be right — a quota, a contract, an upload limit, a bug report — quote the bytes.
Reading the three boxes
Type 1 GB and the page tells you it is 1,000,000,000 bytes, which is 953.67 MiB. Type 1 GiB and it is 1,073,741,824 bytes, which is 1.07 GB. Same box, both directions: a bare number is read as a byte count and expanded onto both ladders; a number with a unit is resolved down to bytes. The unit picker overrides whatever you typed, so you can take one figure and ask “what if that was actually MiB?” without retyping it.
The meter under the results is the honest headline: it shows how far apart the two conventions are at the step your number lands on. Under 1000 bytes it reads zero, because below a kilobyte there is nothing to disagree about.
The 1 TB drive question, done as arithmetic
Type 1 TB above and read the GiB row: 1012 bytes is 931.32 GiB, or 0.909 TiB. That is the whole of the famous “missing” capacity, and nothing is missing — a program that labels 230 bytes “GB” is dividing by a bigger number than the one the capacity was quoted in, so it prints a smaller figure for the same drive. Which convention your own system uses is its choice, and this page does not assume: set the unit picker to GiB, compare with what your machine shows, and you will know. Filesystem overhead and reserved space are a separate subtraction on top, typically much smaller, and they depend on the filesystem.
Open it with your number already in it
The converter reads its input from the address, so a link can carry a finished answer. ?q= takes the size text exactly as you would type it, percent-encoded: ?q=500%20GB opens on 500,000,000,000 bytes, which the IEC box shows as 465.66 GiB — the “why does my 500 GB drive show 465 GB” answer, with no click. &unit= forces how the number is read (any value from the picker: B, kB, KiB, MB … PiB, or auto), so ?q=1.5%20TiB&unit=GB reads the 1.5 as gigabytes — the typed TiB is overridden — and shows 1,500,000,000 bytes, about 1.4 GiB. &precision= sets the decimals (0, 1, 2, 3, 4 or 6). A value the page cannot use is ignored — ?q=garbage opens on the usual 1 GB example rather than an error page. As you edit, the address bar follows along without adding Back-button entries, and Copy link copies it.
Bits are a different mistake
The SI-versus-IEC gap tops out around 10%. The bit-versus-byte mix-up is a factor of eight, and it hides in the same sentence: link and network rates are quoted in bits per second, storage in bytes. A 100 Mbit/s connection moves at most 12.5 MB/s, and the only thing distinguishing the two is the case of the b. This converter handles bytes only — every unit on it is a byte unit — so divide a bitrate by 8 before you bring it here.
Honest limits
Byte counts are JavaScript numbers, which are IEEE-754 doubles, exactly as in the library this page ports. Integers above 253 - 1 — 9,007,199,254,740,991 bytes, about 9.01 PB — cannot all be represented, so beyond that the byte box shows the nearest representable value and says so instead of pretending to be exact. A size that does not land on a byte boundary, such as 1.44 MiB, gives a fractional byte count (1,509,949.44) and the page prints the fraction rather than rounding it away, because a fractional result tells you the figure you were given was already rounded. And the ladder table stops at peta: exa, zetta and yotta exist in both standards, and typing them works, but a table that lists them is padding.
Frequently asked
Does 1 GB mean 1,000,000,000 bytes or 1,073,741,824? Both numbers are real, and they have different names. Giga is an SI prefix and the SI Brochure defines it as 109, so 1 GB is 1,000,000,000 bytes. 1,073,741,824 is 230, and IEC 80000-13 gives that quantity its own name and symbol: 1 gibibyte, 1 GiB. So the standards answer is unambiguous — GB is the decimal one, GiB is the binary one — and the practical answer is that a label reading GB only tells you which was meant if whoever wrote it was being careful. When it matters, ask for the byte count instead of the prefix; that is the number this page puts in the third box.
What is a gibibyte, and who decided KiB and MiB were words? The IEC published the binary prefixes in 1999, as Amendment 2 to IEC 60027-2; they now live in IEC 80000-13:2008, the standard for quantities and units in information science and technology. The scheme takes the first two letters of the SI prefix and adds “bi” for binary: kibi (Ki) = 210 = 1024, mebi (Mi) = 220, gibi (Gi) = 230, tebi (Ti) = 240, pebi (Pi) = 250. Attached to a byte they give KiB, MiB, GiB, TiB and PiB. They exist precisely so that a binary quantity does not have to borrow a decimal prefix and hope the reader guesses right.
Why does a 1 TB drive not show 1 TB of space? Start with the arithmetic, which you can reproduce above by typing 1 TB and reading the GiB row: 1012 bytes divided by 230 is 931.32, and divided by 240 is 0.909. So a capacity of exactly one decimal terabyte, displayed by a program that labels 240 bytes “TB”, reads as 0.91 — and as 931.32 if that program’s unit is 230. No bytes went missing; two different units are both being called TB and GB. Which convention any particular operating system or file manager uses is that program’s own choice, and this page does not guess at yours: set the unit picker to GiB, compare with what your machine shows, and you will know which one it means. Formatting overhead and reserved space are a separate, smaller subtraction on top of that, and they vary by filesystem.
Is it kB or KB, and why is the k lowercase? In SI the symbol for kilo is a lowercase k — capital K is the symbol for the kelvin — so 1000 bytes is correctly written 1 kB. The IEC binary prefix does use a capital: kibi is Ki, so 1024 bytes is 1 KiB. That leaves plain “KB” defined by neither standard, which is why you should read it as “about a thousand bytes, one or the other” rather than as a precise quantity. This page follows both standards: it writes kB for 1000 bytes and KiB for 1024, and it accepts whatever you type, in any case, on the way in.
How many bytes are in a MB, a MiB, a GB and a GiB? 1 kB = 1,000 bytes and 1 KiB = 1,024 — a 2.4% difference. 1 MB = 1,000,000 and 1 MiB = 1,048,576 — 4.86%. 1 GB = 1,000,000,000 and 1 GiB = 1,073,741,824 — 7.37%. 1 TB = 1,000,000,000,000 and 1 TiB = 1,099,511,627,776 — 9.95%. The gap is (1024/1000)n - 1 at step n, so it compounds: every rung of the ladder you climb, the two answers drift a little further apart. That is why a mix-up costs nothing on a text file and roughly a tenth of the number on a multi-terabyte array.
What about megabits — is 100 Mbps the same as 100 MB/s? No, and it is a factor of eight, which dwarfs the 7% this page is about. Network and link rates are quoted in bits per second, and a byte is eight bits, so 100 Mbit/s is 12.5 MB/s at best. The two are told apart by the case of the b: Mb is megabit, MB is megabyte. This converter deliberately handles bytes only — every unit on it, B through PiB and PB, is a byte unit — so if you have a bitrate, divide by 8 before you bring it here.
Does anything I type get uploaded? No. The conversion is a few dozen lines of arithmetic running in this tab, in a file that contains no fetch, no XMLHttpRequest and no upload of any kind, so there is no code path that could send a number anywhere. Nothing is stored either — reload the page and it is back to its example. The page does load one cookieless pageview counter from stats.dankdev.com, which records this page’s address and title and nothing you type into it.
Why does the byte count sometimes have a decimal point? Because you asked for a size that does not land on a byte boundary. 1.44 MiB is 1,509,949.44 bytes, and the page says so rather than rounding quietly — a real file is always a whole number of bytes, so a fractional result is a sign that the size you were given was itself rounded. The same honesty applies at the top end: byte counts here are IEEE-754 doubles, exactly as in the library this page is built on, so above 253 - 1 bytes (about 9.01 PB) not every integer can be represented and the page labels the figure as the nearest value rather than an exact count.