Number System Converter
Convert between decimal, binary, octal, and hexadecimal number systems
About This Tool
Type a number in any of decimal, binary, octal, or hex and the others update at the same time. No conversion button — edit one field and the rest follow.
Keep it open while debugging bitfields, reading register dumps, or checking that a hex color literal is what you expect. Negative decimals show their two's complement representation in the binary and hex fields, which is what you want when reasoning about signed integer overflow.
Maximum supported width is 64 bits. Beyond that, JavaScript's Number type loses precision — for arbitrary-precision conversions, switch to a BigInt-aware tool.
Four fields, four bases, all linked. Edit any one and the tool re-parses the value, normalizes to a canonical representation, and re-renders the others. Decimal accepts negatives and a leading minus sign; the binary and hex fields show the two's complement representation when the decimal is negative. Octal is included for the rare cases where Unix file permissions or older C constants demand it. Width selector lets you constrain to 8, 16, 32, or 64 bits — useful when reasoning about a struct field that you know is uint16_t.
Worked example. Type -1 in the decimal field at 32-bit width. The hex field shows 0xFFFFFFFF, the binary shows 32 ones, and the octal shows 0o37777777777. That is two's complement at 32 bits — every integer's negation is its bit-complement plus one. Type 0xCAFEBABE in the hex field at 32-bit width and the decimal shows -889275714 (signed) or 3405691582 (unsigned, toggle in the corner). The same bit pattern can mean either depending on whether the field is signed.
Where it stops being safe. JavaScript's Number type is a 64-bit double, with 53 bits of integer precision. Above 2^53 (about 9.007 quadrillion), exact integer math breaks. The tool detects this and switches to BigInt for the parsing and conversion, which keeps precision but does not match the bit-width truncation of the underlying language. If you actually need to model 64-bit unsigned wraparound, use a language with native uint64 (Rust, Go, C) — the tool will tell you that's the boundary you crossed.
Common use case: writing assembly or C and trying to remember whether 0x80 in a signed byte is -128 or 128. Type 0x80 in hex at 8-bit width: signed view shows -128, unsigned shows 128. Same bits, two different interpretations, depending on what the surrounding code says. The tool removes the mental gymnastics of "do I add or subtract from 256 here." Especially valuable when reading a register dump from an embedded debugger and the documentation gives the field width but not the sign.
The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.