IEEE 754 Float Converter (32 & 64-bit)
Floating-point numbers are stored as a sign bit, a biased exponent, and a fraction (mantissa), and the gap between what you type and what's actually stored is the source of countless rounding bugs. This converter shows the exact IEEE 754 representation of any decimal number in both float32 (single, 1+8+23 bits, bias 127) and float64 (double, 1+11+52 bits, bias 1023): the colour-coded bit string, the hex word, the unbiased exponent and significand, the value category (normal, subnormal, zero, infinity, NaN), and the value actually stored after rounding. It also runs in reverse — paste an 8- or 16-digit hex word and get the decoded number plus its full breakdown. Handy for debugging serialization, shader and embedded code, GPU buffers, and 'why isn't 0.1 + 0.2 == 0.3' questions. Special inputs Infinity, -Infinity, and NaN are accepted. Everything runs locally; nothing is uploaded.
- Sign
- 0 (+)
- Exponent
- 123 (2^-4)
- Significand
- 1.10011001100110011001101
- Stored
- 0.10000000149011612
Rounded — float32 cannot store this value exactly.
- Sign
- 0 (+)
- Exponent
- 1019 (2^-4)
- Significand
- 1.1001100110011001100110011001100110011001100110011010
- Stored
- 0.1
float32 = 1 sign + 8 exponent + 23 fraction bits; float64 = 1 + 11 + 52. Exponent bias is 127 / 1023.
How to use
- Keep 'Decimal → bits' and type a number (e.g. 0.1, -3.14, 1e10, Infinity, NaN) to see both float32 and float64.
- Read the sign / exponent / mantissa split, the hex word, and the stored value; a note flags when float32 had to round.
- Switch to 'Bits → decimal', pick the precision, and paste a hex word to decode it back to a number.
Frequently asked questions
- Why does the stored value differ from what I typed?
- Most decimal fractions can't be represented exactly in binary floating point. The tool shows the nearest representable value — e.g. 0.1 in float32 is actually 0.100000001490116119384765625. A rounding note appears whenever the stored float32 value differs from your input; float64 stores the same value JavaScript already uses.
- What do the coloured bits mean?
- Red is the sign bit (0 positive, 1 negative), blue is the exponent (biased: subtract 127 for float32 or 1023 for float64 to get the power of two), and green is the fraction/mantissa. For normal numbers the significand is 1.fraction; for subnormals it's 0.fraction with the minimum exponent.
- How are infinity, NaN, and zero shown?
- An all-ones exponent with a zero fraction is ±infinity; an all-ones exponent with a non-zero fraction is NaN; an all-zero exponent and fraction is ±zero (note the distinct sign bit of -0); and an all-zero exponent with a non-zero fraction is a subnormal number. The category is labelled on each card.
- What hex format does decoding expect?
- The big-endian hex of the raw bits: 8 hex digits for float32 (e.g. 3f800000 = 1.0) and 16 for float64 (e.g. 3ff0000000000000 = 1.0). A leading 0x and spaces are ignored, and shorter input is zero-padded on the left.
Guides on this topic
Related tools
Two's Complement Converter (8–64 bit)
Enter a decimal, hex, binary, or octal value and see its 8/16/32/64-bit two's complement bit pattern, plus its signed and unsigned readings, hex, octal, and one's complement — in your browser.
MAC to EUI-64 / Link-local
Convert any MAC address into its modified EUI-64 interface ID and the matching IPv6 link-local address — the same form Windows / Linux compute automatically.
CRC-32 Calculator (CRC-32 & CRC-32C)
Compute the CRC-32 (IEEE 802.3, used by zip/gzip/PNG) or CRC-32C (Castagnoli) checksum of text or hex bytes, shown in lowercase hex, uppercase hex, and unsigned decimal — in your browser.
Bitwise Calculator
AND, OR, XOR, NOT and bit shifts on two integers — shown in binary, hex, unsigned and signed decimal, with selectable 8, 16, 32 or 64-bit width.
Decimal ↔ Fraction Converter (with Inch-Fraction Table)
Convert any decimal into its closest fraction (with adjustable maximum denominator, including binary fractions for inch measurements), and any fraction back into decimal / percent. Includes side-by-side common-fraction and 1/16″ inch-fraction reference tables.
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
Image Dither (Floyd-Steinberg, Atkinson, Bayer)
Convert any image to a 1-bit dithered image using Floyd-Steinberg, Atkinson, Sierra Lite, or ordered Bayer 2/4/8 patterns — for retro Mac/Game Boy looks, e-ink displays, halftone print, or pixel art.