Toolzeroo  ›  Number Base Converter
FREE BROWSER TOOL

Number Base Converter

Convert a whole number from one base to another, from binary (base 2) to base 36. Binary, octal, decimal and hexadecimal are shown at once.

Result
—
BINARY—
OCTAL—
DECIMAL—
HEXADECIMAL—
This tool is designed to process your input in your browser. No account is required.

About this tool

Uses whole-number arithmetic with no size limit, so long numbers convert exactly. Digits above 9 are the letters A to Z. Prefixes like 0x, 0b and 0o are accepted for hex, binary and octal.

Convert whole numbers between number bases: binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16) and any base up to 36. Students use it for computer science homework, and developers for colour codes, permissions, bit masks and IDs.

How to use the Number Base Converter

  1. Type the number, for example 255 or FF.
  2. Choose the base it is written in.
  3. Choose the base you want. Binary, octal, decimal and hexadecimal are always shown underneath.

255 in other bases

255 in decimal is FF in hexadecimal (15 × 16 + 15), 377 in octal (3 × 64 + 7 × 8 + 7) and 11111111 in binary (eight 1s, because 2⁸ − 1 = 255). In base 36, which uses the digits 0–9 and then A–Z, 255 is 73 (7 × 36 + 3).

The same numbers in different bases

Worked out with this converter.

DecimalBinaryOctalHexadecimalBase 36
10101012AA
16100002010G
1001100100144642S
25511111111377FF73
1,000111110100017503E8RS
4,096100000000000010000100035S

How place values work in any base

In base 10, each place is worth ten times the place to its right: 1s, 10s, 100s. In base 2 the places are 1s, 2s, 4s, 8s and so on, and in base 16 they are 1s, 16s, 256s. To convert to decimal, multiply each digit by its place value and add them up: hex 3E8 = 3 × 256 + 14 × 16 + 8 = 1,000. Bases above 10 need extra digits, so A stands for 10, B for 11, up to Z for 35.

Common mistakes

  • Choosing the wrong “from” base, so FF in base 10 shows as invalid.
  • Reading hexadecimal 10 as ten. It is sixteen.
  • Using a digit that the base doesn’t have, such as 2 in binary or 8 in octal.

Frequently asked questions

How do I convert binary to decimal?

Choose base 2 as the “from” base and type the binary number. 1010 in binary is 10 in decimal.

Can it convert very large numbers?

Yes. It uses whole-number arithmetic with no size limit, up to 2,000 digits of input.

Does it handle negative numbers?

Yes. A minus sign is kept, so −1010 in binary is −10 in decimal.

Does it convert fractions or decimals?

No. It converts whole numbers only.