Number Base Converter (Decimal, Binary, Hex, Octal)

Convert a number between any two bases from 2 to 36. Runs entirely in your browser.

How it works

Any whole number can be represented in a base other than 10 by repeatedly dividing by the target base and reading the remainders in reverse. Binary (base 2) uses digits 0-1, octal (base 8) uses 0-7, and hexadecimal (base 16) uses 0-9 plus a-f. Negative numbers and arbitrarily large numbers (via BigInt, no precision loss) are supported.

Examples

DecimalBinaryOctalHex
10101012a
25511111111377ff
0000

FAQ

Are negative numbers supported? Yes — prefix the input with -.

What happens with a digit that's invalid for the source base? You'll see a clear error message (e.g. entering 2 while converting from binary).