About IEEE 754 Converter — Floating Point to Binary Bits
Computers store decimals using the IEEE 754 standard, which packs every floating-point number into a sign bit, an exponent, and a mantissa (fraction). Because most decimals can't be represented exactly in binary, the stored value often drifts slightly from what you typed — which is why `0.1 + 0.2` famously isn't `0.3`.
This IEEE 754 float inspector breaks any number into its exact sign, exponent, and mantissa bits in both 32-bit (single) and 64-bit (double) precision, with the raw hex encoding and the precise value the bits actually denote. It's built for developers debugging precision bugs, serialization formats, and numeric edge cases.
Everything runs locally in your browser — no number you enter ever leaves your machine.
Features
- Color-coded sign / exponent / mantissa bit-field visualizer
- Switch between 32-bit single and 64-bit double precision
- Raw hex encoding plus the exact reconstructed value
- Detects NaN, Infinity, subnormal, and signed-zero values
How to use
- Type a number (or "Infinity" / "NaN") into the input.
- Pick 32-bit or 64-bit precision with the toggle.
- Read the color-coded bit grid: sign, exponent, then mantissa.
- Check the hex encoding and the reconstructed value below.
Frequently asked questions
Why is 0.1 not stored exactly?
0.1 has no finite binary representation, just as 1/3 has no finite decimal one. IEEE 754 rounds it to the nearest representable value, so the mantissa bits encode a number very slightly different from 0.1 — visible in the reconstructed value.
What's the difference between 32-bit and 64-bit floats?
A 32-bit (single) float uses 1 sign bit, 8 exponent bits, and 23 mantissa bits; a 64-bit (double) float uses 1, 11, and 52. Doubles cover a far wider range and store roughly 15–17 significant decimal digits versus about 7 for singles.
What are the sign, exponent, and mantissa?
The sign bit marks positive or negative. The exponent (stored with a bias) scales the value by a power of two. The mantissa holds the significant digits — an implicit leading 1 plus the fraction bits for normal numbers.
How are NaN and Infinity represented?
Both use an all-ones exponent. Infinity has a zero mantissa; NaN has a non-zero mantissa. The inspector flags these special values with a badge instead of an error.
Related tools
Everything runs locally in your browser — your input is never uploaded.