DEVELOPER & DATA

Number Base Converter

Convert between binary, octal, decimal, hex and any base 2–36 exactly (BigInt, no 53-bit limit), with digit grouping and two’s complement for negatives.

The number in binary, octal, decimal, hex and your chosen base at once, its bit length, and for negatives the two’s complement form at 8/16/32/64 bits.

Example: 0xDEADBEEF is 3,735,928,559 — a 32-bit value; −1 shows as -1 in every base and as 1111 1111 (0xff) in 8-bit two’s complement; 2^64 converts exactly.

v0.1.0 · last reviewed 20 September 2026
Loading the workspace…
BUILT TO BE UNDERSTOOD

Exact in every base,
however large.

How the digits are read, why BigInt matters, and what the two’s complement row means.

Reading and writing

Digits 0–9 and a–z (case-insensitive) up to the chosen base; spaces, commas and underscores between digits are ignored; a 0x, 0o or 0b prefix is accepted when it matches the selected base. Conversion is done with BigInt, so a 128-bit hash or a 30-digit decimal converts exactly — a plain JavaScript number would round anything past 53 bits.

Negative numbers

Every base shows a sign. For binary and hex there is also the two’s complement form at the smallest of 8, 16, 32 or 64 bits that holds the value — how the number appears in a register or memory dump (−1 is 0xff in 8 bits, 0xffff in 16).

Grouping

Binary and hex are grouped in fours, octal and decimal in threes (decimal with commas), to make long strings readable; copy buttons strip the grouping. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.

SOURCES

Last reviewed 20 September 2026. How results are checked: How we verify.