Number Base Converter

Convert between binary, octal, decimal and hex live — plus what a base converter usually turns into next: bitwise operations, a signed two's-complement view at a chosen bit width, and reading the same bits as an IEEE-754 float.

Arbitrary base

Every conversion runs in your browser. Nothing you enter is uploaded to a server.

Why this uses arbitrary-precision arithmetic internally

JavaScript's ordinary numbers lose precision beyond 2^53 — a 64-bit hex constant or a large hash read as a number would silently round to the nearest representable value with a naive conversion. Every conversion here uses BigInt internally instead, so a value like 18446744073709551615 (the maximum unsigned 64-bit integer) converts exactly, in every base, with no rounding.

The signed (two's complement) view and the IEEE-754 float breakdown are both interpretations of the same bits at a chosen width — not extra facts about the number. The exact same bit pattern means a different value as an unsigned integer, a signed integer, or a float, and this tool shows all three lenses rather than implying there's one true numeric value hiding in the bits.

Why 128 can read as -128

An 8-bit signed register only has room for -128 through 127. A value of 128 doesn't fit, so it wraps: the same bit pattern that means 128 unsigned means -128 once you read it as signed. This isn't a bug in the tool — it's exactly what a real CPU register does, which is why the overflow is called out explicitly here rather than silently shown as if 128 fit perfectly at that width.

Why does this matter for very large hex values?

Ordinary JavaScript numbers lose precision beyond 2^53 — a naive conversion of a 64-bit hex constant or a large hash read as a number would silently round. Every conversion here uses arbitrary-precision BigInt arithmetic internally instead, so nothing beyond that limit loses accuracy.

What does the two's-complement view actually show?

The same bits, reinterpreted as a signed integer at a chosen bit width — for example what looks like 128 in the unsigned view reads as -128 at 8 bits, because that value doesn't fit in a signed 8-bit register and wraps. It's labelled as an interpretation of the bits, not a second fact about the number.

What is the IEEE-754 breakdown for?

It reads the current decimal value AS a 32-bit or 64-bit float and shows the sign, exponent and mantissa bit fields separately — a genuinely different operation from converting a number's base, since it's about what a specific bit pattern means under the float standard, not what a number looks like in another counting system.

Can I click individual bits?

Yes — the bit grid is interactive. Clicking any bit toggles it and immediately updates every other representation, which is the fastest way to see exactly what flipping one bit does to a value.

Is my data sent anywhere?

No. Every conversion, bitwise operation and float decode runs entirely in your browser using JavaScript. Nothing is transmitted to a server.