Float to Hex Converter
Enter float value for instant hex output in IEEE 754 format
Enter value to convert
Binary Structure View
Common Float to Hex Values
IEEE 754 Conversion Steps
- Separate sign bit (0 for positive, 1 for negative).
- Convert absolute value to binary: integer + fractional parts.
- Normalize mantissa: shift binary point, count exponent bias (127 for single, 1023 for double).
- Exponent field: biased exponent in binary. Mantissa: 23/52 bits after leading 1.
- Combine sign (1 bit) + exponent (8/11 bits) + mantissa into hex bytes.
Core Formula
Value = (-1)^sign × 2^(exponent-127/1023) × (1 + mantissa/2^23/52)
Hex groups 8/16 bits into two-digit representations from binary.
Float vs Hex Bit Layout
Green: sign | Blue: exponent | Gray: mantissa (updates with input)
Frequent Questions
Why different hex for big vs little endian? Bytes reverse order: big starts MSB first, little LSB first.
Does it handle denormalized numbers? Yes, follows IEEE 754 for subnormals when exponent is zero.
What about Infinity or NaN? Represented by max exponent: Inf (no mantissa bits), NaN (non-zero mantissa).
Precision loss on very large/small floats? Limited to IEEE range; single ~7 decimals, double ~15.
