IEEE-754 Float Inspector
See any float's sign, exponent and mantissa bits and its exact decimal value — 32-bit or 64-bit, entirely on this device.
The field breakdown appears here once you enter a value or bit pattern.
| Field | Value | Copy |
|---|---|---|
| Sign | — | |
| Exponent | — | |
| Mantissa | — | |
| Word | — | |
| Exact decimal | — | |
| Approx (round-trip) | — | |
| Classification | — |
- Sign · 1 bit
- Exponent · 11 bits
- Mantissa · 52 bits
Press ? for shortcuts
Do it offline:$ python3 -c "import struct;print(struct.pack('>d',0.1).hex())"
How to use it
- Type a value — a decimal, 1.5e-8, or a keyword like NaN — or paste a hex word; the badge names the mode, and one click overrides it.
- Choose the width: float64, JavaScript's default double, or float32, the single used in GPUs and audio. The same input re-decodes on the narrower field.
- Read the grid: sign, exponent as raw and unbiased, mantissa in bits and hex with its implicit bit, the whole word, and the exact and shortest decimals.
- Copy any single field, or take the whole breakdown as JSON. The labelled strip below tints each bit by its field.
Enter a decimal number or a raw hex bit pattern and see it split into the fields every IEEE 754 float carries: one sign bit, a biased exponent, and the mantissa. Toggle between 64-bit double and 32-bit single to watch one number land on different bits. The exact-decimal row spells out every digit the stored value really holds. Nothing you enter is uploaded.
How it works
Take 1.0 as a double: its bits are 0x3FF0000000000000. The leading bit is the sign, zero here; the next eleven are the exponent field, 1023; the last 52 are the mantissa, all zero. A normal float is (−1)^sign × 1.mantissa × 2^(exponent − bias) — with bias 1023 that is 1 × 1.0 × 2^0, or 1.
The bias lets one unsigned field cover both tiny and huge exponents. Two codes are reserved: all ones for infinity and NaN, all zeros for zero and the subnormals — values so small the implicit leading 1 is dropped for a little more reach toward zero.
Some decimals have no finite binary form, as one third has none in decimal. The double nearest 0.1 runs to 55 fractional digits, printed in full by the exact-decimal row. Store 0.2 too and add them, and that leftover error is why 0.1 + 0.2 comes out as 0.30000000000000004, not 0.3.
Examples
0.1sign 0 +
exponent 01111111011 raw 1019 unbiased -4
mantissa 0x999999999999A implicit 1
word 0x3FB999999999999A
class normal
value 0.1000000000000000055511151231257827021181583404541015625The double nearest 0.1 rounds up in its last nibble to …9A; a rounded note fires and keeps the entered value beside the exact one.
0x40490FDBsign 0 +
exponent 10000000 raw 128 unbiased 1
mantissa 0x490FDB implicit 1
word 0x40490FDB
class normal
value 3.1415927410125732421875Bare or 0x-prefixed hex reads as a bit pattern. This 32-bit word is single-precision π; the exact value shown is a terminating decimal, not π itself.
-0sign 1 -
exponent 00000000000 raw 0 unbiased -1022
mantissa 0x0000000000000 implicit 0
word 0x8000000000000000
class zero
value 0Only the sign bit is set and the rest are zero, so the class is zero and the value is 0; negative zero still compares equal to +0.
1e400sign 0 +
exponent 11111111111 raw 2047 unbiased —
mantissa 0x0000000000000 implicit 0
word 0x7FF0000000000000
class infinity
value Infinity1e400 is past the largest double, so it becomes infinity rather than an error; the overflow is noted, and a non-finite value has no exact decimal.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
NaN is not one value
Any word with the exponent all ones and a non-zero mantissa is a NaN, so millions of patterns qualify. The mantissa's top bit tells quiet from signalling; the rest is a payload.
Subnormals reach below the normal floor
With the exponent field all zeros the implicit 1 is gone and the exponent sticks at its minimum. The smallest positive double is 2^-1074, shown here as 5e-324.
float32 and float64 disagree on 0.1
One decimal rounds to different binaries at different widths. As a double 0.1 keeps 55 fractional digits; as a single it lands on 0.100000001490116119384765625.
Integers stay exact only so far
Every integer up to 2^53 is an exact double; 2^53 + 1 is not, and rounds back to 2^53. For a single the wall is 2^24.
Hex input is forgiving
The bit field takes a 0x or 0b prefix, underscores, spaces and either case. A short word is left-padded with a note; one too wide is refused, not clipped.
Common errors
`foo` is not a number — enter a decimal like 3.14, -0, 1e-10, NaN or Infinity- Value mode expects a decimal, scientific notation or a keyword. The offending text is quoted and highlighted in place; the input is never rewritten for you.
`Z` is not a valid hexadecimal digit (0-9, A-F)- In bit mode the parser names the base it assumed, the digits it accepts, and the character it stopped on — usually a typo.
Bit pattern is too wide for a 64-bit float — it holds at most 16 hex digits- A 64-bit float is exactly 16 hex or 64 binary digits. Leading zeros are fine, but real digits past the width would change the value, so the page refuses.
Input is larger than the 4,096-character limit — inspect one value at a time, or use the CLI: python3 -c "import struct;print(struct.pack('>d',0.1).hex())"- A float is one short value, so 4,096 characters far exceeds any real input; past it the whole paste is declined, and the CLI prints a value's bytes locally.
FAQ
Why does 0.1 + 0.2 not equal 0.3?
Neither 0.1 nor 0.2 has an exact binary form, so each is stored as the nearest double. Those roundings survive the sum and surface as 0.30000000000000004. Decode 0.1 and the exact-decimal row already shows the error.
What is the difference between float32 and float64?
A float64, or double, gives 11 bits to the exponent and 52 to the mantissa; a float32, or single, gives 8 and 23. The double reaches further and keeps more precision; the single is half the size.
What is the difference between a quiet and a signalling NaN?
Both carry the exponent all ones and a non-zero mantissa. Its top bit decides: set is quiet, passed along silently; clear is signalling, meant to raise an exception. The rest is payload.
Does the number I enter get uploaded?
No. Every decode, both sides of the width toggle and the exact-decimal expansion run inside this browser tab, with no request to any server.
Keyboard shortcuts
- ⌘/Ctrl + Enter
- Decode the current input again.
- ⌘/Ctrl + S
- Download the whole breakdown as JSON.
- ⌘/Ctrl + C
- Copy the full breakdown while the selection is empty.
- ⌘/Ctrl + Shift + C
- Force-copy the breakdown regardless of any selection.
- t
- Cycle the theme, unless a field has focus.
- ? or ⌘/Ctrl + /
- Open this page's shortcut reference.
- Esc
- Dismiss the top overlay; the input is left alone.