UTILS.
Private by default
B→

Byte Size Humanizer

Turn a byte count into a human-readable size and parse a size string back to bytes.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Bytes to Human-Readable Size converts in both directions. In the top box, enter a whole number of bytes, for example 1572864, and the tool shows it twice: in binary units (B, KiB, MiB, GiB, TiB, PiB, each 1,024 times the last) and in decimal units (B, KB, MB, GB, TB, PB, each 1,000 times the last). Values are rounded to two decimals, so 1572864 shows as 1.5 MiB and 1.57 MB. Commas, spaces and underscores in the number are ignored, so 1,572,864 works, but decimals, signs and letters are reported as invalid.

In the second box, type a size such as 1.5 GB, 700 MiB or .5 TB and the tool returns the exact byte count, rounded to a whole byte and grouped with commas. Units are case-insensitive, a space before the unit is optional, and a number with no unit is read as bytes. Accepted units are B, KB, MB, GB, TB, PB and KiB, MiB, GiB, TiB, PiB. Here KB is always 1,000 bytes and KiB always 1,024, and shortcuts such as K or M are not recognised. Use a dot for decimals; 1,5 GB is rejected.

The two sets of figures explain why a drive sold as 1 TB shows about 931 GiB in an operating system that counts in binary. Numbers are held as ordinary JavaScript numbers, so counts above about 9 quadrillion bytes (2^53) lose exact precision.

Frequently asked questions

What is the difference between KB and KiB?
KB is decimal (1000 bytes) while KiB is binary (1024 bytes); operating systems and drive makers often disagree, so both are shown.
What units can I type to convert back?
Any unit like KB, MB, GB or their binary forms KiB, MiB, GiB — for example 1.5 GB or 700 MiB.
Why does my 1 TB drive show less space?
The maker counts 1 TB as 1,000,000,000,000 bytes, but many systems report in binary units, where that is about 931 GiB. Nothing is missing; the units differ.
Which numbers does the bytes box accept?
Whole numbers only. Commas, spaces and underscores are ignored as separators, while decimals, negative signs and letters show an invalid message.

More tools