Bytes to KB, MB, GB — binary and decimal sizes, both ways

Enter a raw byte count to see it as a readable size in both binary units (KiB, MiB, GiB) and decimal units (KB, MB, GB), or enter a size such as 5 MB or 1.5 GiB to get the exact number of bytes and bits.

Live demo · real result from this tool
A byte count (1536000) or a size with a unit (5 MB, 1.5 GiB, 800kb).
Binary (IEC)1.46 MiB
Decimal (SI)
1.54 MB
Bytes
1,536,000
Bits
12,288,000

Table

UnitValueUnitValue
B1,536,000B1,536,000
KiB1,500KB1,536
MiB1.464844MB1.536
GiB0.001431GB0.001536
TiB0.000001TB0.000002
PiB0PB0
EiB0EB0

KB/MB/GB are powers of 1000 (SI); KiB/MiB/GiB are powers of 1024. Windows labels 1024-based sizes as KB/MB/GB, which is why a "500 GB" drive shows as about 465 GB.

Processed on your device — nothing is uploaded.

How to use the bytes humanizer

  1. Enter Bytes or a size: a plain byte count (1536000), or a number with a unit (5 MB, 1.5 GiB, 800kb). Commas in the number are ignored.
  2. Set Decimal places (0–6, default 2) for the headline sizes.
  3. Read the four results: Binary (IEC), Decimal (SI), Bytes and Bits.
  4. Use the table below them to see the same amount in every unit from B to EiB and EB.

What it does and when to use it

Logs, APIs and ls -l give sizes as raw byte counts. Upload limits, cloud bills and dashboards use human units, and they do not always agree on what “MB” means. This tool shows both readings side by side. Use it to set an upload limit, check an object size, or explain why a disk looks smaller than its label.

It accepts B, KB, MB, GB, TB, PB, EB and their binary forms KiB to EiB, plus the shorthand k, m, g and t (decimal).

The duration humanizer does the same job for milliseconds. The number formatter prints any number with locale separators, and the data rate converter handles speeds such as Mbit/s.

How it works

The input is split into a number and a unit. The number is multiplied by the unit’s size: powers of 1,000 for KB, MB and GB, and powers of 1,024 for KiB, MiB and GiB. For the readable form, the byte count is divided by 1,024 (or 1,000) until it drops below one step, and the unit reached is shown. Bits are bytes × 8. Everything runs in your browser.

Worked examples

A raw count of 1536000 bytes:

Binary (IEC): 1.46 MiB
Decimal (SI): 1.54 MB
Bytes: 1,536,000
Bits: 12,288,000

The table row KiB | 1,500 | KB | 1,536 shows why this number is often called “1.5 MB”: it is exactly 1,500 KiB.

A size back to bytes, 1.5 GiB:

Binary (IEC): 1.5 GiB
Decimal (SI): 1.61 GB
Bytes: 1,610,612,736

The “missing space” case, 500 GB, gives Binary (IEC): 465.66 GiB.

Limits and tips

  • Use the unit your system uses. Linux ls -lh and du -h use binary steps but print K, M and G. macOS Finder uses decimal.
  • Unknown units are rejected. 12 parsecs gives Unknown unit "parsecs". Words like “megabytes” are not parsed, so use the short form.

Frequently asked questions

What is the difference between KB and KiB?
KB (kilobyte) is 1,000 bytes under the SI and IEC rules, and KiB (kibibyte) is 1,024 bytes. The same goes up the scale, so MB is 1,000,000 bytes and MiB is 1,048,576. The binary prefixes were defined by the IEC so the two could be told apart.
Why does my 500 GB drive show as 465 GB?
Drive makers count in decimal GB, but Windows divides by 1,024 and still labels the result GB. 500,000,000,000 bytes is 465.66 GiB, which Windows shows as about 465 GB. No space is missing.
Is the unit case-sensitive?
Mostly not. kb, KB and kB all mean 1,000 bytes, and gib means GiB. The exceptions are Kb, Mb and Gb with a lowercase b, which usually mean bits, so the tool stops and asks you to check rather than guess.
Can I enter a size in bits, such as a 100 Mbit/s connection?
Not directly; the input is always read as bytes. Divide bits by 8 first. 100 megabits is 12.5 MB, so enter 12.5 MB.
How big a number can it handle?
Units go up to EiB and EB, and numbers can be written like 1e9. Above about 9 PB (2 to the power 53 bytes), the exact byte count may be rounded, because JavaScript numbers lose integer precision there.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close