Skip to the tool
DevToolBench

Byte Converter

Bytes across the 1000 and 1024 scales, side by side.

1.5 GB, 1,5GB, 1536 MiB, 100 Mbps
When none is typed
0–9

Everything runs in your browser. Nothing you type is sent to a server.

Found a bug in this tool? Report it.

Share this tool

Two scales, one set of letters

A byte converter has to answer a question the units themselves refuse to settle: does "1 MB" mean a million bytes or 1,048,576 of them? Both are in daily use, both are written the same way, and the difference is nearly five per cent — enough to fail a capacity check, blow a quota, or turn a support ticket into an argument. So this page never picks one. Type a size and both scales appear at once, with the bit rates beside them.

The input is forgiving on purpose. 1.5 GB, 1,5GB, 1536 MiB, 700 megabytes, 100 Mbps and a bare 4096 with a unit chosen from the menu all parse to the same internal count. Everything happens in this tab.

Where 931 comes from

Drive makers count in powers of a thousand, because that is what the prefixes kilo, mega, giga and tera have meant since the metric system was written. A drive labelled 1 TB genuinely contains 1,000,000,000,000 bytes.

Windows counts in powers of 1024 and then borrows the metric labels anyway. Dividing a trillion by 1024 three times gives 931.32, and File Explorer prints "931 GB". Nothing has been lost and nobody has lied; two conventions collided inside the same three letters. macOS switched to decimal reporting in Snow Leopard, which is why the same drive shows a different figure on a Mac and a PC sitting on the same desk.

The gap widens as the prefixes climb, and that is the part people underestimate. Kilo against kibi is a 2.4% difference. Giga against gibi is 7.4%. At the peta scale it is 12.6% — a rounding error at the top of a spreadsheet that becomes a six-figure line at the bottom of one.

The IEC prefixes, and why hardly anyone uses them

The International Electrotechnical Commission settled this in 1998. Binary multiples got their own names — kibi, mebi, gibi, tebi, pebi, written KiB, MiB, GiB, TiB, PiB — leaving the metric prefixes to mean what they always meant. It is a clean fix, it has been standard for more than a quarter of a century, and adoption has been spectacularly uneven.

Linux tooling largely complied: ls -lh, du -h and df -h print binary sizes, and GNU coreutils will spell them out as KiB and MiB when asked. Ubuntu made decimal reporting policy in 2010. Windows never moved, and still writes KB for 1024 bytes in Explorer, in Task Manager and in every file properties dialog. Storage vendors never moved either, in the other direction. RAM is the one place where nobody argues: memory is addressed in binary and a 16 GB stick is 16 GiB, whatever the label says.

The practical rule: write KiB and MiB when you mean 1024, and when you write KB and MB in a user interface, say somewhere which one you meant. Ambiguity in a units label is a bug that only shows up in someone else's spreadsheet.

Megabits, megabytes and the number on the router

Network equipment counts bits, not bytes, and it counts them decimally. A 100 Mbps connection carries 100,000,000 bits per second, which is 12,500,000 bytes — about 12.5 MB/s, before framing, TCP headers and retransmissions take their share. A 1 Gbps line gives you roughly 125 MB/s on paper and rather less in practice.

This is why a download manager showing "11 MB/s" on a 100 Mbps line is not evidence of throttling; it is arithmetic plus overhead. Typing a rate with a bps or /s suffix above converts it directly.

Precision, and the ceiling ordinary numbers hit

Sizes are counted here as exact integers of bits, held in BigInt. A regular JavaScript number is a 64-bit float and stops representing every integer beyond 2^53 — 9,007,199,254,740,992, which is about nine petabytes and no longer an unusual figure in a storage plan. Past that point a naive converter silently rounds before it has done any conversion at all.

The decimal places control is display only; the underlying count never loses a byte. Working further down the stack? The number base converter covers the same values in binary and hex, and the CIDR calculator does the equivalent arithmetic for address space rather than storage.

Frequently asked questions

Why does my 1 TB drive show up as 931 GB?

Nothing is missing. The manufacturer sold you 1,000,000,000,000 bytes, which is a terabyte under the SI prefixes every other industry uses. Windows then divides by 1024 three times, gets 931.32, and prints "GB" anyway. The drive holds exactly what the box said; two parties are using the same three letters for two different numbers.

What is the difference between a megabyte and a mebibyte?

A megabyte is 1,000,000 bytes and a mebibyte is 1,048,576 — a gap of about 4.9%. The gap compounds with each prefix: kilo and kibi differ by 2.4%, giga and gibi by 7.4%, tera and tebi by 10%, peta and pebi by 12.6%. That last one is why storage quotes and storage invoices stop agreeing at scale.

Is 100 Mbps the same as 100 MB per second?

No, and the difference is a factor of eight. Broadband is sold in megabits per second, and a byte is eight bits, so a 100 Mbps line tops out around 12.5 MB/s before any protocol overhead. Type "100 Mbps" above and the byte figure appears next to it.

How large a number can this handle?

Any size you can write in thirty digits. The arithmetic runs on BigInt rather than ordinary JavaScript numbers, which stop counting every integer once past 9,007,199,254,740,992 — nine petabytes, and a real number in a storage estimate. Paste 9007199254740993 and the last byte is still there.

Which scale should I use in my own code?

Match whatever the reader will compare against. Disk capacity, network transfer and cloud billing are decimal, so a progress bar or an invoice line should divide by 1000. Memory, page sizes and block sizes are binary by construction, so divide by 1024 and write KiB, MiB and GiB to say which one you meant.

Related tools

Updated