IEEE 754 floating-point converter

Enter a number such as 0.1, 1e-45, -0 or nan to see how single (32-bit) and double (64-bit) precision store it, or enter hex bits to decode them. The exact decimal value that is really stored is shown too.

Number mode accepts 0.1, -2.5e10, inf, -inf, nan and -0. Hex mode needs 8 hex digits (float32) or 16 (float64).
float32 hex0x3DCCCCCD
float64 hex0x3FB999999999999A
Shortest decimal (float64)
0.1
float32 bits (sign, exponent, mantissa)
0 01111011 10011001100110011001101
float32 sign
0 (+)
float32 exponent (stored, then actual power)
123 → 2^-4
float32 mantissa field
0x4CCCCD
float32 kind
Normal number
float32 exact value
0.100000001490116119384765625
float64 bits (sign, exponent, mantissa)
0 01111111011 1001100110011001100110011001100110011001100110011010
float64 sign
0 (+)
float64 exponent (stored, then actual power)
1019 → 2^-4
float64 mantissa field
0x999999999999A
float64 kind
Normal number
float64 exact value
0.1000000000000000055511151231257827021181583404541015625

float32 cannot store this value exactly; the nearest float32 is shown.

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Choose A number and type a value, or choose Hex bits and paste 8 or 16 hex digits.
  2. Read the float32 and float64 rows: hex, bit groups, sign, exponent, mantissa and the exact stored value.
  3. Copy any row with its copy button where one is offered.

How it works

The number is written into a 32-bit and a 64-bit IEEE 754 binary format using the browser’s own floating-point conversion, and the bits are read back. The exact value is calculated from the integer significand and the power of two with big-integer arithmetic, so every digit shown is real.

Example: 0.1 in float32 is 0x3DCCCCCD, with bits 0 01111011 10011001100110011001101. In float64 it is 0x3FB999999999999A.

Tips and common mistakes

  • -0 and 0 have different bits (the sign bit) but compare equal.
  • Integers above 2^24 (float32) or 2^53 (float64) cannot all be stored exactly.
  • Hex is shown as big-endian text; a file or network dump may list the bytes in little-endian order.

Frequently asked questions

Why is 0.1 not stored exactly?

Binary floating point can only store fractions whose denominator is a power of two. 0.1 is rounded to the nearest representable value: 0.100000001490116119384765625 in float32 and 0.1000000000000000055511151231257827... in float64. That is why 0.1 + 0.2 is not exactly 0.3.

How is a float laid out?

float32 has 1 sign bit, 8 exponent bits and 23 mantissa bits; float64 has 1, 11 and 52. For normal numbers the value is (-1)^sign × 1.mantissa × 2^(exponent - bias), with bias 127 or 1023.

What are subnormal numbers, infinity and not-a-number?

An exponent field of all zeros means zero or a subnormal number, which has no implicit leading 1 and so loses precision. An exponent of all ones means infinity (mantissa zero) or not-a-number (mantissa not zero).

Can I enter a not-a-number value with a specific payload?

Yes, in Hex mode. Typing nan gives the usual quiet not-a-number (7FC00000 or 7FF8000000000000). Other such bit patterns can be decoded from hex.

What happens when I decode float32 hex?

The 8 digits are read as float32, and the float64 rows show the same value widened to double precision, which is always exact.

More in Developer

All tools in this category: Developer ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.