Toolstia / Number base converter

Convert numbers between bases

Type a number in one base and see it in binary, octal, decimal and hexadecimal at once, plus one more base of your choice from 2 to 36. Large numbers are converted exactly, with no rounding.

  • Binary (base 2)—
  • Octal (base 8)—
  • Decimal (base 10)—
  • Hexadecimal (base 16)—
  • Base 36—

How it works

  1. Choose the base your number is written in.
  2. Type the number.
  3. Copy the value you need.

What a base is

Decimal uses ten digits, binary uses two (0 and 1), octal uses eight and hexadecimal uses sixteen (0 to 9 and a to f). Computers store binary, and programmers often read it as hexadecimal because it is shorter.

Prefixes and spaces

You can type 0x before a hex number, 0b before binary or 0o before octal. Spaces and underscores are ignored, so 1111 0000 works.

Exact for big numbers

Ordinary calculators lose digits past about 15 places. This tool uses whole-number maths of any size, so a 30-digit number converts without error.

Whole numbers only

Fractions such as 0.5 are not supported. Negative whole numbers are, and the minus sign is kept.

Questions

Why does it say my number is invalid?

It contains a digit that does not exist in that base, for example a 2 in binary.

Are letters case sensitive?

No. FF and ff are the same.

Is anything uploaded?

No. The number stays in your browser and is never sent anywhere.

What is base 36?

It uses the digits 0 to 9 and letters a to z. It is often used for short IDs.