Skip to main content
Developer tools100% FreeInstant

IEEE 754 Converter: Float and Double to Bits and Hex

This free IEEE 754 converter shows how a number is stored as a 32-bit float or a 64-bit double. See the sign, exponent and mantissa bits and the hex value, or decode a hex pattern back to a number.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is It and When Do You Need It?

Floating point numbers are stored in binary with a sign, an exponent and a mantissa. This explains why 0.1 + 0.2 is not exactly 0.3 in most programming languages.

Enter a decimal to see its bits, or paste hex bits to see the number they mean.

How to Use This Tool

  1. Enter a number, or hex bits.
  2. Choose 32 or 64 bit.
  3. Choose whether the input is decimal or hex.
  4. Press Convert.

How the Calculation Works

The number is written into a binary buffer as a float or a double, and the bytes are read back. The sign is the first bit, the exponent is the next group (biased by 127 or 1023), and the mantissa holds the fraction after an implied leading 1. The stored value is shown with full precision to reveal rounding.

Worked Example

0.1 as a 32-bit float is 0x3DCCCCCD: sign 0, exponent 01111011 (123, so 2 to the power −4) and mantissa 10011001100110011001101. Its stored value is 0.10000000149011612.

Common Uses

  • Debugging rounding errors.
  • Binary protocols and file formats.
  • Teaching floating point.
  • Reading memory dumps.

Tips and Common Mistakes

  • Never compare floats with equals.
  • Use integers for money.
  • Doubles have about 15 to 16 digits of precision.

Next, you may need the bitwise calculator, checksum calculator, ASCII table, Base32 encoder.

Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.

Frequently Asked Questions

The standard that almost every computer uses to store decimal numbers in binary, as a sign bit, an exponent and a mantissa.
Many decimal fractions have no finite binary form, so the closest binary number is stored. 0.1 is stored as 0.100000001490116… in 32-bit.
One sign bit, then 8 exponent bits and 23 mantissa bits for a float, or 11 and 52 for a double.
All-ones exponent means infinity or NaN, and an all-zero exponent means zero or a very small subnormal number.

Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.