Float to Hex Converter Online

Float to Hex Converter Online

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

Decimal Hex (Big Endian) Hex (Little Endian)
0.00x000000000x00000000
1.00x3f8000000x0000803f
3.141590x40490fdb0xdb0f4940
-1.00xbf8000000x000080bf
NaN0x7fc000000x0000c07f

IEEE 754 Conversion Steps

  1. Separate sign bit (0 for positive, 1 for negative).
  2. Convert absolute value to binary: integer + fractional parts.
  3. Normalize mantissa: shift binary point, count exponent bias (127 for single, 1023 for double).
  4. Exponent field: biased exponent in binary. Mantissa: 23/52 bits after leading 1.
  5. 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.