Asistente RD

Number base converter

Number base converter: change integers between binary, octal, decimal, hexadecimal and any base from 2 to 36 instantly. Free, client-side, no sign-up.

Free · No sign-up · In your browser

Binary (base 2)

11111111

Octal (base 8)

377

Decimal (base 10)

255

Hexadecimal (base 16)

FF

Custom base

Result in base 5

2010

Share on WhatsApp Last reviewed: July 9, 2026

What a number base converter does

A positional numeral system represents a number using a base: the count of distinct digits it has to work with. The decimal system (base 10) uses ten digits, 0 through 9. Binary (base 2) uses only 0 and 1, and it is the native language of computers. Octal (base 8) and hexadecimal (base 16) are handy shorthands for long binary strings — in hexadecimal, values above 9 are written with letters (A = 10, B = 11, …, F = 15).

This converter takes a whole number written in the base you pick and instantly rewrites it in the four most common bases — binary, octal, decimal, and hexadecimal — plus any arbitrary base from 2 to 36. Everything is computed in your browser with arbitrary-precision integers (BigInt), so you can convert huge numbers without losing a single digit.

How to use the converter

  1. Pick the input base from the dropdown (2, 8, 10, 16, or anything up to 36).
  2. Type the whole number using only digits that are valid for that base. If you enter an impossible digit — a G in hexadecimal or a 2 in binary — you get a gentle warning and no result until you fix it.
  3. Read the cards: the same value appears in binary, octal, decimal, and hexadecimal at once.
  4. Under Custom base, choose any output base from 2 to 36 to see the number in it. Use each card’s Copy button to grab the result.

There is no “calculate” button — the conversion updates as you type.

The method

Converting from any base to decimal relies on place value: multiply each digit by the base raised to the position it sits in (starting at 0 on the right) and add up the products. To go from decimal to another base, use repeated division: divide by the base, keep the remainder, repeat on the quotient, then read the remainders from bottom to top.

DecimalBinaryOctalHexadecimal
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010

Worked example

Let’s convert 255 in decimal to the three usual bases.

To hexadecimal, by repeated division by 16:

  • 255 ÷ 16 = 15, remainder 15 → 15 is written F
  • 15 ÷ 16 = 0, remainder 15 → F

Read from bottom to top: FF.

To binary, dividing by 2 (or noticing that 255 = 256 − 1 = 2⁸ − 1, eight ones): 11111111. To octal, grouping the binary three bits at a time (11 111 111 → 3 7 7): 377.

Checking the other way with place value: FF in hexadecimal is 15 × 16 + 15 = 255; 11111111 in binary is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255; and 377 in octal is 3 × 64 + 7 × 8 + 7 = 255. Everything matches. Two quick extra cases: 1010 in binary is 10 in decimal, and 2A in hexadecimal is 2 × 16 + 10 = 42.

Frequently asked questions

Why does hexadecimal use letters?

Because a base of 16 needs 16 distinct symbols and we only have ten digits (0-9). The missing six are borrowed from the first letters: A, B, C, D, E, and F stand for 10, 11, 12, 13, 14, and 15. The converter accepts those letters in upper or lower case interchangeably.

Can I convert very large numbers?

Yes. The tool uses arbitrary-precision integers, so there is no practical ceiling like the one floating-point decimals hit. A value with dozens of digits converts exactly, with no rounding and no lost final digit.

Does it convert decimals with a fractional part, or only integers?

Only integers. Converting a fractional part between bases can produce infinitely many digits (just as 1/3 in decimal is 0.333…), so this tool focuses on whole numbers, which is the most common use in computing and in class.

What do bases 8 and 16 mean in programming?

They are compact ways to read binary. Each octal digit maps to 3 bits and each hexadecimal digit to 4 bits, so a byte (8 bits) fits in two hex digits. That is why web colors (#FF8800), memory addresses, and many codes are written in hexadecimal.

What happens if I type an invalid digit?

The converter notices the symbol does not belong to the chosen base and shows a warning instead of a wrong answer. Fix the digit and the cards fill back in on their own.

Related tools