Binary Prefixes in Hex

This is a binary-prefix converter. Write a size such as 1 KiB or 500 GB as a byte count and hex. IEC KiB/MiB use 1024 (1 KiB = 0x400). SI kB/MB use 1000 (1 kB = 0x3E8). RAM is usually 1024; disk labels are usually 1000.

Examples — click a swatch

Click a value to copy it

Same byte count in every unit — click a row to load 1 of that unit

SI (1000) — 1000n

IEC (1024) — 1024n = 210n

What this converter is

This is a binary-prefix / file-size converter with a hex column. 1 KiB is 1024 bytes = 0x400. 1 kB is 1000 bytes = 0x3E8. IEC names (KiB, MiB, GiB) are powers of 1024; SI names (kB, MB, GB) are powers of 1000. It is not a general hex calculator — use HEX to decimal for that, and Hex bitwise to mask an address.

How to use it

Enter a quantity such as 1 or 16.5 and pick a unit, or switch Read as to Hex and paste a byte count (0x400). Examples load 1 KiB, 1 kB, 16 MiB, 500 GB and 0x400. Cards show hex, decimal bytes, and the same count as IEC and SI. The conversion table lists every unit for the current size — click a row, or a row in the SI/IEC reference tables, to load 1 of that unit. Copy result copies the hex.

1000 vs 1024

RAM is built in powers of two, so a “16 GB” DIMM is 16 GiB. Disk vendors print TB as 1000³ bytes; many file dialogs then divide by 1024³ and the drive looks smaller. Hex follows binary: 1 KiB, 1 MiB, 1 GiB are 0x400, 0x100000, 0x40000000. SI values are not round in hex (1 MB = 0xF4240). Fractions such as 1.5 KiB round to the nearest whole byte. Negative sizes are rejected. Units go through EB / EiB.

Where to use it

Flash maps, linker scripts, firmware size vs a 2 MiB chip, or explaining why a 500 GB disk is about 465.66 GiB.

Questions

Is KB 1000 or 1024?

This page uses kB for 1000 and KiB for 1024. Windows Explorer has often labelled 1024-byte kibibytes as “KB”; that is the same confusion this table splits.

Why does hex look round only for KiB?

1024 is 210, so it lands on 0x400. 1000 is not a power of two, so 0x3E8 never looks like a round hex power.