UTILS.
100% in-browser
💾

IEEE-754 Floating-Point Converter

Convert a decimal number to/from its IEEE-754 single (32-bit) or double (64-bit) bit pattern and dissect the sign, exponent and mantissa fields.

Enter a number or bit pattern above.

About this tool

The IEEE-754 Floating-Point Converter shows exactly how a number is stored in memory as a 32-bit single-precision or 64-bit double-precision float, and can reverse a raw bit pattern back into its decimal value. It uses JavaScript typed arrays (Float32Array / DataView) so the bit pattern is the genuine hardware representation, not an approximation.

In forward mode it reports the pattern as hexadecimal and as binary split into its three fields: the sign bit, the exponent (8 bits with bias 127 for float32, 11 bits with bias 1023 for float64), and the mantissa (23 or 52 bits). It also decodes the unbiased exponent and classifies the value as normal, subnormal, zero, infinity or NaN. Crucially it prints the exact stored value read back from the bits — which for float32 often differs from what you typed, making floating-point rounding error visible. For instance 0.1 is not stored exactly in either precision.

In reverse mode you paste a hex pattern (with or without 0x) or a full-width binary string and it reinterprets those bits as a float and shows the resulting decimal value plus the same field breakdown. Everything runs locally in your browser. This is a go-to tool for understanding rounding, comparing single versus double precision, and inspecting the special encodings for ±0, ±∞ and NaN.

Frequently asked questions

Why does the stored value differ from what I typed?
Most decimal fractions cannot be represented exactly in binary floating point, so the nearest representable value is stored. The converter reads the bits back and shows that exact stored value, which reveals the rounding error — especially in 32-bit single precision.
How are the fields laid out?
Float32 uses 1 sign bit, 8 exponent bits (bias 127) and 23 mantissa bits; float64 uses 1 sign bit, 11 exponent bits (bias 1023) and 52 mantissa bits. The unbiased exponent equals the raw exponent minus the bias.
How are zero, infinity and NaN encoded?
An all-zero exponent with zero mantissa is ±0, or a subnormal if the mantissa is non-zero. An all-ones exponent means ±infinity when the mantissa is zero and NaN when it is non-zero. The tool labels each category.
Can I go from a bit pattern back to a number?
Yes. Switch to reverse mode and paste an 8-hex-digit (float32) or 16-hex-digit (float64) pattern, or a full 32- or 64-bit binary string, and the tool reinterprets those exact bits as a floating-point value.

More tools