Skip to content
SimplCalc

Number Base Converter

Type a number in any base and see it in binary, octal, decimal and hexadecimal at once. Large values stay exact.

Digits 0 to 9 and a to z. Prefixes 0x, 0b and 0o, underscores, spaces and a leading minus are accepted.

Number is written in base
Binary (base 2)
11111111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF
73

Magnitude needs 8 bits.

How to use the number base converter

Type a whole number, then pick the base it is written in: binary, octal, decimal, hexadecimal or any base from 2 to 36 under “Other”. The binary, octal, decimal and hexadecimal forms appear together with a copy button on each row, and one extra row shows any base you choose. The same page covers decimal to hex, hex to decimal, binary to decimal, binary to hex and every other pairing.

Accepted input

  • Digits 0 to 9, then the letters a to z for values 10 to 35. Letters are not case sensitive.
  • A prefix that matches the source base: 0x for hex, 0b for binary, 0o for octal.
  • Underscores and spaces as digit separators, so 1111_0000 and 0b1010 1010 both work.
  • A leading minus (or plus) sign. The sign is carried over to every result.

A digit that does not exist in the source base, such as 2 in binary or G in hexadecimal, is reported with the offending character.

Method

A number written with digits dn … d1 d0 in base b has the value Σ di × bi. The converter evaluates that sum with BigInt arithmetic, then writes the value in the target base by repeated division by that base, which BigInt does natively. Because no floating-point numbers are involved, results are exact for inputs of thousands of digits.

Example

Hexadecimal 0xDEADBEEF becomes 13 × 167 + 14 × 166 + 10 × 165 + 13 × 164 + 11 × 163 + 14 × 162 + 14 × 16 + 15 = 3,735,928,559 in decimal. Decimal 255 is 11111111 in binary, 377 in octal and FF in hexadecimal.

Limits

Only whole numbers are converted. Negative values show a minus sign in front of the magnitude, not a two’s complement bit pattern. Input is limited to 4,000 characters.

Frequently asked questions

How do I convert hexadecimal to decimal?

Choose Hex as the source base and type the value, with or without a 0x prefix. The decimal result appears straight away. By hand, multiply each digit by the matching power of 16 and add the products.

Why can this handle numbers that other tools round?

It uses BigInt integers instead of floating-point numbers. JavaScript numbers lose exactness above 2^53 − 1 (9,007,199,254,740,991), while BigInt values keep every digit however large they get.

Does it convert fractions or negative numbers?

Negative whole numbers work and keep their sign in every base. Fractions such as 0.1 are not supported, and the converter asks you to remove the decimal point.

Sources and methodology

Last reviewed 2026-12-04