Convert between bytes, KB, MB, GB, TB, and PB instantly — with a toggle for binary (1024) or decimal (1000) base.
Binary uses 1024 as the base for each unit step (how operating systems typically calculate), while decimal uses 1000 (how storage manufacturers typically advertise capacity), leading to different reported sizes for the same data.
Manufacturers advertise storage using decimal (1000-based) units, while operating systems display capacity using binary (1024-based) units, making the same drive appear smaller in your OS than its advertised capacity.
Use decimal for how storage is typically marketed and sold, or binary to match what your operating system's file properties usually display.
This tool converts a file size value into all common units at once — bytes, kilobytes, megabytes, gigabytes, terabytes, and petabytes — with a toggle between binary (1024-based) and decimal (1000-based) calculation methods.
There are two competing conventions for calculating file size units, and the difference causes genuine confusion. The decimal convention treats 1 kilobyte as exactly 1,000 bytes, 1 megabyte as 1,000 kilobytes, and so on — this is how storage device manufacturers typically advertise capacity (a "1TB" drive means 1,000,000,000,000 bytes). The binary convention instead treats 1 kilobyte as 1,024 bytes (2¹⁰), 1 megabyte as 1,024 kilobytes, and so on — this is how most operating systems calculate and display file and storage sizes internally. Because 1024 is larger than 1000, the same physical amount of data reports as a smaller number in binary units than in decimal units.
This binary-vs-decimal mismatch is exactly why a drive advertised as "1TB" often shows something like "931 GB" in your operating system's file explorer — the manufacturer calculated 1TB using the decimal (1000-based) convention, while your OS displays the same physical capacity using the binary (1024-based) convention. No actual storage is lost; it's purely a difference in how the same number of bytes is being labeled.
To resolve this ambiguity, the International Electrotechnical Commission introduced distinct binary unit names — kibibyte (KiB), mebibyte (MiB), gibibyte (GiB) — specifically to mean the 1024-based units, leaving KB, MB, and GB to unambiguously mean the 1000-based decimal units. In practice, though, most software and marketing still use "KB," "MB," and "GB" loosely for both conventions, which is exactly why a converter with an explicit binary/decimal toggle is useful.
All conversions happen directly in your browser — no values are sent to a server.
The tool first converts your entered value into a single underlying byte count by multiplying it by the selected base (1000 or 1024) raised to the power matching your chosen starting unit — bytes use a power of 0, kilobytes a power of 1, megabytes a power of 2, and so on up through petabytes at a power of 5. From that single byte figure, it then divides back down by the same base raised to each unit's power to populate every result field simultaneously, which is why switching the binary/decimal toggle recalculates all six values at once rather than just the one you're focused on.
Petabyte (PB) might seem unnecessary for everyday file sizes, but it's useful context: 1 PB equals roughly 1,024 TB in binary terms, a scale relevant to enterprise data centers, large-scale cloud storage services, and big-data applications. Including it alongside the more commonly used units gives a complete picture of the full unit ladder from a single byte up to enterprise-scale storage.
People reach this tool searching for things like "convert GB to MB," "how many bytes in a KB," "1TB to GB," "file size calculator," and "KB vs KiB difference." Because the tool converts to and from all six units in both binary and decimal modes simultaneously, it answers nearly every pairwise file-size conversion question in one place rather than needing a separate calculator for each pair of units.
Take a 4.7 GB file, a size roughly matching a standard-definition DVD. In decimal mode, that's 4,700,000,000 bytes, or about 4,481 MiB and 4.38 GiB if you switch to binary mode, since binary units report a smaller number for the same physical amount of data. This is the exact same kind of discrepancy that makes a "4.7GB" DVD show as holding less than 4.7 "GB" worth of files once copied onto a computer that reports sizes in binary.
Developers working with file uploads, storage quotas, or memory limits often need to convert between units quickly when writing validation logic or reading server logs. IT professionals sizing backups, estimating bandwidth needs, or explaining storage discrepancies to end users benefit from having both binary and decimal figures side by side, rather than mentally re-deriving one from the other every time a size comes up in a different convention.
Manually converting between file size units means remembering which power of 1000 or 1024 applies to each unit step, then doing the multiplication or division correctly — simple in theory, but a single wrong exponent produces a result that's off by an order of magnitude, which is an easy mistake under time pressure. This tool removes that risk and, more usefully, shows every unit and both base conventions at once, so you can immediately see how a value compares across the full range without running several separate calculations.