Double-precision float to bits
See exactly how a computer stores a decimal as a 64-bit double: 1 becomes 3FF0000000000000, with sign bit 0, exponent 1023 and 52 zero mantissa bits. Zeros, subnormals, infinities and NaN each get their own label. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Value
- 1
- Output format
- binary64
- Bits
- 64
- Hex
- 3FF0000000000000
- Hex prefixed
- 0x3FF0000000000000
Enter a decimal such as one, minus three point five, or a scientific value, and the tool returns the canonical sixteen-digit hexadecimal word, the full sixty-four-bit binary string, the sign bit, the eleven-bit biased exponent field, the fifty-two-bit mantissa, the unbiased exponent when defined, and a category label for normal numbers, subnormals, signed zeros, infinities, and NaN. Firmware dumps, network traces, language runtimes, and textbook exercises all share this deterministic binary64 layout.
What the 64 bits of a double hold
A binary64 value occupies exactly sixty-four bits arranged as one sign bit, eleven exponent bits with bias one thousand twenty-three, and fifty-two explicit mantissa bits (the fraction or significand field) with an implicit leading one for normal numbers. The sign bit is zero for non-negative values and one for negative values, including negative zero. The biased exponent field encodes the true power of two as an unsigned integer: for normal numbers the unbiased exponent equals the biased field minus one thousand twenty-three.
Special patterns reuse the same layout without a separate tag: an all-ones exponent with a zero mantissa is signed infinity; an all-ones exponent with a nonzero mantissa is a NaN; an all-zero exponent with a zero mantissa is signed zero; an all-zero exponent with a nonzero mantissa is a subnormal number that fills the gap near zero. This capability always targets binary64 only—it does not switch to thirty-two-bit single precision—so every response has a fixed field width you can document in protocols, serializers, and exam keys.
Encoding uses big-endian byte order through DataView, which matches the network and textbook convention of most significant bit first, so the first hex nibble is always the high end of the word and the first binary digit is always the sign.
What you can do with it
Firmware and protocol dumps
Match a decimal double against big-endian binary64 hex from memory dumps, CAN logs, or network traces by comparing sign, exponent, and mantissa fields.
FAQ
Can I encode Infinity and NaN?
Yes. Send Infinity, -Infinity, or NaN as numbers or spelled strings. They map to the standard all-ones exponent patterns with zero or nonzero mantissa.
What bit pattern does the number 1 have as a double?
Its hex word is 3FF0000000000000. The sign bit is 0, the exponent bits are 01111111111, which is 1023, and all 52 mantissa bits are zero. The real exponent is 0, so the value is exactly one.
Why is the exponent stored with a bias of 1023?
So that its 11 bits can hold both negative and positive powers of two as one unsigned number. For a normal number, subtract 1023 from the stored exponent to get the real one: a stored 1023 means two to the power of zero.
What does a subnormal number look like in the bits?
Its exponent bits are all zero while the mantissa is not. Subnormals fill the gap between zero and the smallest normal number, and the tool labels them so you never mistake one for a signed zero.
Does the tool also show 32-bit single precision?
No. It always works in 64-bit double precision, so every result has the same width: 16 hex digits and 64 binary digits. For single precision you need a different float converter.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/dev/ieee754-double-bits \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":1}'const res = await fetch("https://api.kit.forhosting.com/dev/ieee754-double-bits", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/ieee754-double-bits",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/ieee754-double-bits", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/ieee754-double-bits", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.ieee754_double_bits",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
A double-precision float to bits converter shows the exact sixty-four-bit IEEE 754 pattern a computer uses for a floating-point number. Non-numeric text is rejected with invalid_input instead of being silently coerced.
What IEEE-754 binary64 stores: sign, exponent, and mantissa
IEEE-754 binary64 is the interchange format almost every modern CPU, GPU, and language runtime uses for double-precision floating-point arithmetic.
Input contract, response shape, and how to read the fields
Special values Infinity, negative Infinity, and NaN are accepted as numbers or as spelled strings so you can inspect their canonical bit patterns without inventing out-of-band flags. Example: value equals one yields hex three-F-F-zero… and binary starting with zero one one one one one one one one one one followed by fifty-two zero mantissa bits, category normal, biased exponent one thousand twenty-three, unbiased exponent zero. POST a JSON body with one required field named value: a double-precision floating-point number. The field may arrive as a JSON number or as a numeric string; aliases number, n, and decimal are accepted. Missing fields, empty strings, booleans, objects, and non-numeric text fail with invalid_input naming the field and are not billed. On success the body echoes the published value (NaN and infinities as strings because JSON cannot carry them as numbers), is_neg_zero when Object.is detects negative zero, format binary64, bits sixty-four, hex as sixteen uppercase digits without a prefix, hex_prefixed with a leading zero-x, binary as a sixty-four character string of zeros and ones, sign_bit, exponent_bits, mantissa_bits, sign as plus or minus one, biased_exponent as an integer from zero to two thousand forty-seven, unbiased_exponent when defined for normal and subnormal cases, category as one of normal, subnormal, pos_zero, neg_zero, pos_infinity, neg_infinity, or nan, and exponent_bias always one thousand twenty-three. Pair the response with your own dump viewers if you need spaced nibble groups; this endpoint returns dense hex and binary strings ready for equality tests.
Where a double-precision float-to-bits API earns its keep
Systems programmers and embedded engineers use a double-precision float to bits tool when matching memory dumps, wire formats, and debugger registers against decimal values without standing up a full disassembler. Failed validation does not consume balance. Educators and exam platforms need a deterministic oracle that shows students the sign-exponent-mantissa split for homework on IEEE-754 rather than a black-box printf of hex alone. Data and ML pipelines occasionally need to prove that a stored binary64 word matches a documented constant such as pi or a sentinel quiet NaN payload when auditing parquet or protobuf payloads. Keep requests to a single number, pin the hex and field strings in tests, and you get reproducible binary64 layouts for firmware notes, LMS plugins, and edge workers without a local IEEE library of your own.
Integration use cases
Serializer and unit-test goldens
Pin expected IEEE-754 encodings for constants (1.0, -3.5, pi) in CI so cross-platform float interchange never drifts silently.
IEEE-754 classroom checks
Show students the exact 1+11+52 bit layout for homework on double precision without hand-counting binary fields.
Technical questions
How do I convert a double-precision float to IEEE-754 bits?
Send a JSON body with value set to your decimal number. The API returns hex, binary, sign_bit, exponent_bits, mantissa_bits, and category for the binary64 encoding.
Is this only for sixty-four-bit doubles?
Yes. This capability always encodes IEEE-754 binary64 (1 sign + 11 exponent + 52 mantissa bits). It does not switch to single-precision binary32.
What error do I get for non-numeric input?
The task fails with invalid_input and a message naming the field. Invalid input is not billed.
What does the double-precision float to bits converter cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.