IEEE 754 Converter

Bit layout — click a bit to flip it

Sign Exponent Fraction

Field Bits Encoded Meaning

IEEE 754 converter

This is an IEEE 754 converter: paste a decimal or a hex bit pattern and read sign, exponent, fraction and the stored value. IEEE 754 packs a real into sign, biased exponent and fraction. Identifiers such as binary16, bfloat16, binary32, binary64, NaN, Infinity and ULP stay untranslated. Float 1 in binary32 big-endian hex is 3F800000 (little-endian 0000803F). binary64 of 1 is 3FF0000000000000. 0.1 in binary32 is 3DCCCCCD — stored as 0.10000000149011612, not 0.1. π as binary32 is 40490FDB. +∞ is 7F800000, −0 is 80000000, quiet NaN is typically 7FC00000.

How to use

  1. Pick binary16, bfloat16, binary32 or binary64. Type a decimal (1, 0.1, Infinity, NaN, -0) or a hex bit pattern.
  2. Chips load 0.1, 1, 3.14159, ±0, ±∞ and NaN. Show Example is 1 → 3F800000.
  3. Click any bit to flip it. Hex can be shown big-endian (the usual bit pattern) or little-endian (dump order).
  4. Read class (normal, subnormal, zero, inf, nan), stored value, rounding error and previous/next values one ULP away. Copy Result copies the hex.

Fields, bias and specials

Value = (−1)sign × significand × 2exponent−bias. Bias is 15 (binary16), 127 (binary32 / bfloat16) or 1023 (binary64). Exponent all-1 and fraction 0 is ±Infinity; fraction ≠ 0 is NaN. Exponent all-0 and fraction 0 is ±0; fraction ≠ 0 is a subnormal (no hidden 1). binary16 max finite is 65504 (7BFF); larger inputs become Infinity — bfloat16 keeps binary32’s range instead.

Why 0.1 + 0.2 ≠ 0.3

Those decimals are repeating in base 2. binary64 stores 0.1 as a value slightly above 0.1; 0.1+0.2 lands one ULP above the literal 0.3. Languages print a short rounding that looks exact. This page shows the bit pattern. Do not compare floats with ===; use a tolerance. Money does not belong in binary floats.

Hex dumps and byte order

The hex box is the integer of the bit string. Big-endian matches textbooks and this tool’s default. A little-endian dump of 3F800000 is 0000803F — switch Byte order to Little-endian or use Endian Converter. Hex length must be 4 / 8 / 16 digits for 16 / 32 / 64-bit formats.

Frequently asked questions

  • Why eight hex digits for 1.0? binary32 is 4 bytes.
  • Need 64-bit? Switch to binary64: 1 is 3FF0000000000000.
  • Which NaN? JavaScript uses a quiet NaN; payloads can differ. x === NaN is always false — use Number.isNaN.
  • Does it upload? No. DataView runs in the browser.

Related tools

Swap dump bytes with Endian Converter. Read the pattern as an integer with Hex to Decimal. Convert whole numbers with Decimal to Hex.

Need integer hex instead of floats? Decimal to Hex →