Command Palette

Search for a command to run...

IE

IEEE 754 Converter

Convert a decimal number to its IEEE 754 floating-point bits, or decode hex and binary back to a value. Single and double precision, with sign, exponent, and mantissa broken out.

What is an IEEE 754 Converter?

An IEEE 754 converter shows how a computer stores a floating-point number. Enter a decimal value like 3.14159 and the tool encodes it into the exact bit pattern defined by the IEEE 754 standard, splitting the result into its three parts: the sign bit, the exponent field, and the mantissa (also called the fraction or significand). It works in both directions, so you can also paste a 32-bit or 64-bit binary string, or its hexadecimal equivalent, and decode it back into the number it represents.

Used as an IEEE 754 floating point converter, it makes the classic 0.1 problem visible. Choose Single (32-bit), keep Decimal, enter 0.1 and click Convert: the hexadecimal is 3DCCCCCD, the biased exponent is 123 (unbiased 2^-4), and the Stored value reads 0.10000000149011612. Switch to Double (64-bit) and the same input gives 3FB999999999999A, yet the Stored value shows 0.1, because a double is printed as the shortest decimal that reads back to the same 64 bits.

Floating-point numbers are not stored the way we write them. A value is kept as a sign, a power of two, and a fractional significand, following the scheme in IEEE 754-2019. That design is why 0.1 plus 0.2 does not equal exactly 0.3, why some decimals round when stored, and why very large and very small magnitudes are possible in the same 32 or 64 bits. Seeing the sign, exponent, and mantissa laid out makes these behaviours concrete instead of mysterious, which helps when you are debugging a numeric bug, writing a serializer, studying computer architecture, or comparing single and double precision.

This tool runs client-side and uses the same ArrayBuffer and DataView primitives the JavaScript engine uses internally, so the bit patterns match what your CPU would produce, down to the rounding. Single precision (binary32) uses 1 sign bit, 8 exponent bits, and 23 mantissa bits; double precision (binary64) uses 1 sign bit, 11 exponent bits, and 52 mantissa bits. The special cases are handled too: positive and negative zero, subnormal numbers, infinity, and NaN are each identified. Nothing you enter is uploaded, and the tool keeps working offline once loaded.

How to use the IEEE 754 Converter?

  1. Pick single or double precision

    Choose single (32-bit, binary32) or double (64-bit, binary64). Double is the default for most languages, so pick it unless you are targeting float specifically.

  2. Choose your input type

    Select Decimal to encode a number, or Hex or Binary to decode an existing bit pattern back into a value. Special inputs like Infinity, -Infinity, and NaN are accepted in decimal mode.

  3. Enter your value

    Type a decimal number such as 3.14159 or 6.022e23, or paste the exact number of hex digits or bits the precision requires. The conversion updates as soon as you convert.

  4. Read the breakdown and copy

    See the sign, exponent, and mantissa split out, along with the full bits, hex, biased and unbiased exponent, and the stored value read back from the bits. Each row of the table has its own copy button.

Single and double precision, side by side

A float is three fields packed into a fixed number of bits: one sign bit, an exponent, and the mantissa that holds the digits. How many bits each field gets is the entire difference between a 32-bit and a 64-bit number, and it is what decides where precision runs out.

Bit layout of IEEE 754 binary32 and binary64
FieldSingle (32-bit)Double (64-bit)
Sign1 bit1 bit
Exponent8 bits11 bits
Mantissa23 bits52 bits
Exponent bias1271023
Total4 bytes8 bytes

Key Features

  • Single and Double Precision

    Convert to binary32 (1 + 8 + 23 bits) or binary64 (1 + 11 + 52 bits), the two formats used by float and double in nearly every language.

  • Both Directions

    Encode a decimal number into bits, or decode a binary or hexadecimal bit pattern back into the value it represents, without switching tools.

  • Sign, Exponent, Mantissa Split

    The result is broken into its three fields, with both the biased exponent stored in the bits and the unbiased power-of-two it applies.

  • Special Values Detected

    Positive and negative zero, subnormal numbers, infinity, and NaN are each identified so you can see exactly which case a bit pattern falls into.

Frequently Asked Questions

Choose single or double precision, keep the input type on Decimal, type your number, and convert. The tool encodes the value into its IEEE 754 bit pattern and shows the sign bit, exponent field, mantissa, full binary, and hexadecimal. All of it runs in your browser.

Comments

0 comments

0/2000 characters

No comments yet. Be the first to share your thoughts!

ieee 754 converterfloat to binaryfloating point converterieee 754float to hexdouble precision convertersingle precision floatdecimal to floating pointbinary to floatieee 754 floating point converterieee-754 floating point converter