IEEE 754 Floating-Point Converter — 32-bit Single & 64-bit Double

Convert a decimal number to its exact IEEE 754 floating-point bits — single (32-bit) or double (64-bit). See the sign bit, exponent field with its bias, mantissa bits, the full bit pattern, hex, the value actually stored, and the rounding error. Live in your browser.

Converter Number Systems Updated Jun 21, 2026
How to Use
  1. Pick the precision — 32-bit single or 64-bit double.
  2. Type a decimal number (try 0.1, -5, 3.14, 1e-40 for a subnormal, or “inf” / “nan”).
  3. Read the breakdown: sign, exponent (raw bits, unbiased value, bias) and mantissa, plus the full bit string and hex.
  4. Check “Value stored” and “Rounding error” to see how exactly your number fits — click any value to copy it.
Sign Exponent Mantissa

How a number becomes IEEE 754 bits

Almost every computer stores fractional numbers in the IEEE 754 format, which packs three fields into a fixed number of bits: a single sign bit, an exponent field, and a mantissa (also called the fraction or significand). A 32-bit single uses 1 + 8 + 23 bits; a 64-bit double uses 1 + 11 + 52. The value is reconstructed as (-1)sign × 1.mantissa × 2exponent − bias. That leading 1. is implicit — it isn’t stored — which is how the format squeezes one extra bit of precision out of every number. This converter computes the bits with typed arrays (a DataView), so what you see is bit-for-bit identical to what your CPU would write to memory.

The bias, and why 0.1 has a rounding error

The exponent field is stored biased: a fixed offset (127 for single, 1023 for double) is added so the field can stay an unsigned integer while still representing negative powers of two. So a stored exponent of 0 actually means 2−127’s neighbourhood, and the real exponent is always stored − bias. Because the mantissa is binary, any value whose exact form needs an infinite binary expansion — like 0.1, 0.2 or 0.3 — gets rounded to the nearest representable value. The “Value stored” and “Rounding error” cards show this directly: the double nearest to 0.1 is actually 0.1000000000000000055…, and that crumb of error is exactly why 0.1 + 0.2 ≠ 0.3 in most programming languages.

Special values: zero, infinity, NaN and subnormals

A few exponent patterns are reserved. An all-zero exponent with an all-zero mantissa is zero — and because the sign bit is independent, IEEE 754 has both +0 and −0. An all-zero exponent with a non-zero mantissa is a subnormal (denormal) number, where the implicit leading bit becomes 0 so the format can creep closer to zero at gradually reduced precision. An all-ones exponent with a zero mantissa is ±Infinity; an all-ones exponent with a non-zero mantissa is NaN. The tool labels each of these cases as you type so you can see the boundaries of the format for yourself.

Quick reference

Value
(−1)s × 1.m × 2e−bias
Single (32-bit)
1 sign · 8 exp · 23 mantissa · bias 127
Double (64-bit)
1 sign · 11 exp · 52 mantissa · bias 1023
1.0 single
0x3F800000 · exp 0
0.1 double
0x3FB999999999999A
±Infinity
exp all 1s · mantissa 0
NaN
exp all 1s · mantissa ≠ 0
Subnormal
exp all 0s · mantissa ≠ 0

About the IEEE 754 Floating-Point Converter — 32-bit Single & 64-bit Double

The IEEE 754 Floating-Point Converter — 32-bit Single & 64-bit Double is a simple, free helper for everyday tasks that runs entirely on your own device. Convert a decimal number to its exact IEEE 754 floating-point bits — single (32-bit) or double (64-bit). See the sign bit, exponent field with its bias, mantissa bits, the full bit pattern, hex, the value actually stored, and the rounding error. Live in your browser.

How it works

Type a value, then pick what you want to change it into. The answer appears straight away. It all happens on your own device, so it is fast and nothing you type is sent away. Just check that you picked the right “from” and “to” so you get the answer you wanted.

Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.

Frequently Asked Questions

Why isn’t 0.1 stored exactly?

IEEE 754 stores numbers in binary, and 0.1 has no finite binary representation — just like 1/3 has no finite decimal. The nearest representable double is 0.1000000000000000055511151231257827021181583404541015625, so the converter shows a tiny non-zero rounding error. This is why adding 0.1 + 0.2 in most languages gives 0.30000000000000004.

What is the exponent bias?

The exponent field is stored as an unsigned integer with a fixed offset added so it can represent negative powers. For single precision the bias is 127, for double it is 1023. The real (unbiased) exponent is the stored value minus the bias — so a stored exponent of 127 in single precision means an actual exponent of 0.

What are subnormal numbers?

When the exponent field is all zeros, the number is subnormal (denormal): the implicit leading 1 becomes a leading 0, letting the format represent values closer to zero than the smallest normal number, at reduced precision. The converter labels these and very small inputs like 1e-40 (single) land here.

How are Infinity and NaN encoded?

Both use an all-ones exponent field. If the mantissa is all zeros the value is ±Infinity (sign bit picks the sign); any non-zero mantissa is NaN (Not a Number). There are many NaN bit patterns — this tool produces the canonical quiet NaN your browser emits.

Is anything uploaded?

No. The exact bits are computed in your browser with typed arrays (DataView), so the result is bit-for-bit identical to what your CPU would store. Nothing is sent to a server.

How do I use the IEEE 754 Floating-Point Converter — 32-bit Single & 64-bit Double?

Just type or paste your value. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Does it cost anything or need an account?

No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.

Is anything I type uploaded?

No. The tool works entirely on your device, so the values you enter never leave your browser.

Common Use Cases

Debugging precision bugs

See exactly why a value like 0.1 or 0.3 doesn’t compare equal, and read off the rounding error in a single click.

Low-level & embedded work

Get the exact hex bit pattern to drop into firmware, memory dumps, register values or a binary file.

Learning floating point

Understand sign / exponent / mantissa, the exponent bias, and how normal, subnormal, infinity and NaN values are laid out.

Cross-checking serialization

Verify the bytes a language writes for a float against the canonical IEEE 754 encoding before they hit the wire.

Last updated: