Convert decimals to 32-bit and 64-bit IEEE 754 and back — with the sign, exponent and mantissa bits, hex, exact stored value, and rounding error, all in your browser.
IEEE 754 Floating Point Converter
Convert decimals to 32-bit and 64-bit IEEE 754 and back — with the sign, exponent and mantissa bits, hex, exact stored value, and rounding error, all in your browser.
The IEEE 754 Converter runs entirely in your browser using standard number APIs. The decimals, hex, and bit patterns you convert stay on your device and are never uploaded to ArrayKit.
The IEEE 754 Converter turns a decimal number into its exact 32-bit (single) and 64-bit (double) floating-point representation. It shows the sign bit, the biased exponent, and the mantissa as separate colour-coded bit fields, plus the hexadecimal word, the exact value the bits actually store, and the rounding error between what you typed and what the machine keeps. Because binary can't represent most decimal fractions, values like 0.1 drift by a tiny amount — this tool makes that drift visible. Work the other way too: paste a hex pattern or a raw bit string and recover the decimal it decodes to. It's built for developers debugging float precision, comparing float32 against float64, or inspecting Infinity, NaN, and denormals. Every conversion runs locally in your browser; the numbers you enter never leave your device.
Features
Convert any decimal to 32-bit (single) and 64-bit (double) IEEE 754
Colour-coded sign, exponent, and mantissa bit fields
Shows the hex word alongside the full binary bit string
Reports the exact stored value and the rounding error versus your input
Reverse mode decodes a hex pattern or bit string back to a decimal
Handles Infinity, NaN, negative zero, and subnormal (denormal) numbers
Displays the biased and unbiased exponent so you can read the scale
Runs entirely in your browser — the numbers never leave your device
How to use the IEEE 754 Converter
Keep Decimal → IEEE 754 selected and type a number such as 0.1
Pick 32-bit or 64-bit to see single- or double-precision bits
Read the sign, exponent, and mantissa fields, the hex, and the rounding error
Switch to IEEE 754 → Decimal and paste a hex or binary pattern to decode it back
0.1 has no exact binary form, so float32 stores a value slightly larger than 0.1.
Common errors & troubleshooting
Two numbers that should be equal compare as different in code. — Rounding differs per operation, so compare floats with a small tolerance (epsilon) instead of ==, or move to 64-bit for more precision.
A pasted hex value decodes to Infinity or NaN unexpectedly. — An all-ones exponent field means Infinity (zero mantissa) or NaN (non-zero mantissa). Check the width too — 8 hex digits for 32-bit, 16 for 64-bit.
0.1 + 0.2 does not equal 0.3 in your program. — Each value is rounded to the nearest binary float first, so the sums differ. Convert 0.1, 0.2, and 0.3 here to see the exact stored values behind the mismatch.
A very small number is labelled 'subnormal'. — Below the smallest normal exponent, floats drop the implicit leading 1 and use subnormal (denormal) encoding, trading precision to reach closer to zero.
Frequently asked questions
Why isn't 0.1 stored exactly in IEEE 754?
0.1 is a repeating fraction in binary, just as 1/3 is in decimal, so it can't be written in a finite number of bits. The converter rounds it to the nearest representable value and shows the leftover rounding error.
What's the difference between 32-bit and 64-bit floating point?
32-bit (single / float) uses an 8-bit exponent and 23-bit mantissa for roughly 7 decimal digits of precision. 64-bit (double) uses 11 and 52 bits for about 15–16 digits. Toggle the precision to compare the same number in both.
How do I read the sign, exponent, and mantissa fields?
The first bit is the sign (0 positive, 1 negative). The next 8 or 11 bits are the exponent, stored with a bias of 127 or 1023. The remaining 23 or 52 bits are the mantissa — the fraction after an implicit leading 1 for normal numbers.
How are Infinity, NaN, and negative zero encoded?
An all-ones exponent with a zero mantissa is ±Infinity; with a non-zero mantissa it is NaN. Negative zero is all zeros except the sign bit. The tool labels each of these special cases as you enter them.
Can I convert a hex float value back to a decimal?
Yes. Switch to IEEE 754 → Decimal, choose Hex or Binary, and paste the pattern. The tool rebuilds the sign, exponent, and mantissa and shows the exact decimal the bits represent.
What is a subnormal (denormal) number?
When the exponent field is all zeros but the mantissa is not, the number is subnormal: it drops the implicit leading 1 to represent values smaller than the smallest normal float, at reduced precision. The tool flags these automatically.