IEEE 754 Float / Hex Converter
Enter a number to see its 32-bit and 64-bit IEEE 754 representation in hex and binary, split into sign, exponent and mantissa, or decode a hex pattern.
Use the tool
Why this tool exists
Floating-point numbers store a sign, an exponent and a fraction, which is why 0.1 cannot be held exactly and why 0.1 plus 0.2 is not 0.3. Seeing the actual bits explains many surprises: rounding in a financial report, NaN handling in a network protocol, or a value that shows up as 0x3f800000 in a memory dump.
Type one value per line, such as 0.1, -118.625, NaN or 1e300. The tool prints the float32 and float64 hex, the bit groups and the stored value after rounding to single precision. Paste 0x40490fdb to decode it as a float32, or a longer pattern as float64.
How to use it
- Enter one number or hex pattern per line, such as 0.1 or 0x40490fdb.
- Read the hex and the sign, exponent and mantissa bits for 32 and 64 bits.
- Copy the values you need.
Frequently asked questions
How does it decide between 32 and 64-bit hex input?
Up to eight hex digits are read as a 32-bit float and up to sixteen digits as a 64-bit double. Longer patterns are rejected.
Why does the stored 32-bit value differ from my number?
Single precision has only about seven significant decimal digits, so the nearest representable value is shown. 0.1 becomes roughly 0.10000000149.
Does it show half precision or bfloat16?
No. Only the 32-bit and 64-bit formats are supported, because those cover most programming languages, databases and memory dumps. Half precision and bfloat16 are not included.
Which special values work?
NaN, Infinity and -Infinity are accepted, as are numbers in exponent form like 1e300. Zero shows the sign bit, so negative zero can be told apart from zero.