Skip to the tool
Binary Translator Free tools

Number base converter

A number base calculator that converts between any two number systems: binary, octal, decimal, hex, or any base from 2 to 36, with the working. It also works as a hex converter and a base 36 converter.

Updated · Written and checked by Murugan Vellaichamy

Waiting for input

Prefixes 0b, 0o, 0x and spaces or underscores between digits are fine. A point starts the fraction.

Result
Try:

How to convert between any two bases

Go through decimal. First turn the number into decimal by multiplying each digit by the base raised to its position and adding. Then divide by the new base again and again, and read the remainders from the bottom up.

When both bases are powers of 2 (binary, base 4, octal, hex, base 32) there’s a shortcut: go through binary instead, grouping bits by 2, 3, 4 or 5.

DigitPlace valueDigit × place value
233 = 2754
132 = 99
031 = 30
130 = 11

54 + 9 + 0 + 1 = 64, so 21013 = 6410.

Number systems and their bases

BaseNameDigits255 in this base
2Binary0 111111111
3Ternary0–2100110
8Octal0–7377
10Decimal0–9255
12Duodecimal0–9, A, B193
16Hexadecimal0–9, A–FFF
36Base 360–9, A–Z73

How it’s calculated

Conversions use exact whole-number arithmetic (JavaScript BigInt), so long numbers keep every digit. Fractions are kept as exact ratios; when the digits repeat, the repeating block is found and marked instead of rounded.

Questions

Is this a number base calculator too?

Yes. It works as a base calculator for conversions: base 10 to base 2, base 12, base 36 or any other pair from 2 to 36. For arithmetic in binary or hex, use the binary calculator or the hex calculator.

Is a number system converter the same as a base converter?

Yes. A number system is named by its base: binary is base 2, octal base 8, decimal base 10 and hexadecimal base 16. This converter handles those four and every other base up to 36.

Why does the converter stop at base 36?

Bases above 10 use letters for the extra digits, and there are 10 digits plus 26 letters, which makes 36.

Are fractions converted exactly?

Yes. The converter keeps the fraction as an exact ratio, finds where the digits start repeating and marks that block with a line over it.

Does it convert negative numbers?

Yes, with a minus sign. For the two’s complement bit pattern of a negative number, tick “Read as signed”.

More converters

Copied