Skip to content
Dev Utilities

Number base converter

Convert between binary, octal, decimal, hex and any base to 36

Every base

Binary (2)
Octal (8)
Decimal (10)
Hex (16)
Digits 0–9 then a–z

Magnitude

0bits

Enter a value

Decimal digits

0

Hex digits

0

Two per byte

What this does with your input

  • Arithmetic is BigInt, so nothing is rounded however long the number is. A 512-bit key converts exactly, which it would not through a JavaScript number.
  • Integers only. BigInt has no fractional part, so 1.5 and 0.1012 are rejected rather than truncated.
  • Bases 2 to 36, using 0–9 then a–z. Beyond 36 there is no agreed alphabet — Base58 and Base64 are encodings of bytes, not positional number bases, and belong to a different tool.
  • A negative is a sign in front of the digits (−255 is −ff), which is the arithmetic answer. The two's complement section above is the machine one.
  • _, , and spaces are ignored, so a pasted 1_000_000 or DE AD BE EF works.
  • Auto-detect only trusts a 0x, 0o or 0b prefix, or all-decimal digits. Anything else is genuinely ambiguous — "11" is valid in every base — so it asks rather than guesses.