Skip to content
Conversions & Units

Number Base Converter

Convert between binary, octal, decimal, hexadecimal and any base from 2 to 36 — with a step-by-step positional breakdown showing how each digit contributes.

Calculator

Converted
FF
Hexadecimal (base 16)
Bin
11111111
Oct
377
Dec
255
Binary (base 2)
11111111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF
Base 36
73

Binary bit grid

Positional breakdown (base 10)

DigitValuePlaceBase^PlaceContribution
22210^2 = 100200
55110^1 = 1050
55010^0 = 15
Total255
Results are estimates. Verify with a professional for important decisions.

About this calculator

This calculator converts any non-negative integer between binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16) and any custom base from 2 to 36. Type a number, choose its source base, and the tool instantly shows the equivalent in all four standard bases alongside a step-by-step positional breakdown.

How to read your results

The four result boxes at the top show the same value expressed in binary, octal, decimal and hexadecimal. Below them, the positional breakdown table explains how each digit contributes to the total: every digit is multiplied by the source base raised to the power of its position (counting from zero on the right), and the products sum to the decimal value. Read the table from the most-significant digit on the left to the least-significant on the right.

How it's calculated

Converting from a source base to decimal uses the weighted-sum rule: each digit is multiplied by the source base raised to the power of its position, where position 0 is the rightmost digit. The products are summed to obtain the decimal value. To convert from decimal to any target base, repeated integer division is applied: divide the number by the target base, record the remainder as the next digit (from least significant to most significant), then repeat with the quotient until it reaches zero. The digits collected in reverse order give the representation in the target base. For hexadecimal, digit values 10–15 are written as uppercase A–F.

Worked example

Enter 255 in base 10 (decimal) and convert.

Binary: 11111111 — eight ones, each representing 128, 64, 32, 16, 8, 4, 2 and 1 respectively; Octal: 377; Hexadecimal: FF. All four forms represent the same integer 255.

Frequently asked questions

What is a number base (radix)?

A number base, or radix, defines how many distinct digits a positional numeral system uses. Base 10 uses digits 0–9, binary (base 2) uses only 0 and 1, hexadecimal (base 16) uses 0–9 and then A–F for values 10–15. The position of each digit determines its weight: the rightmost position carries weight base^0 = 1, the next carries base^1, and so on.

Why is hexadecimal so common in computing?

One hexadecimal digit represents exactly four binary bits (a nibble), so two hex digits compactly express one byte (8 bits). Memory addresses, colour codes and cryptographic hashes are all typically written in hex because it is far more readable than a long string of ones and zeros.

How do I convert from binary to decimal by hand?

Write the binary number, then assign each digit its positional weight — the rightmost digit has weight 2^0 = 1, the next 2^1 = 2, 2^2 = 4, and so on. Multiply each digit (0 or 1) by its weight and add the products. For example, binary 1010 = 1×8 + 0×4 + 1×2 + 0×1 = 10.

What bases beyond 16 are used in practice?

Base 32 and base 36 appear in URL-shorteners, content hashes and serial-number encoding because they pack more information into fewer characters while using only letters and digits. Base 64 (not included here, as it uses two symbol classes) is common for binary-to-text encoding in email and web APIs.

Why are fractions and negative numbers not supported?

Positional fractions require a radix point and an extra layer of conversion rules, while signed integers need a sign convention (two's complement, sign-magnitude, etc.) that varies by context. This tool focuses on the core conversion case — non-negative integers — to keep the result unambiguous for all bases 2 to 36.

Sources

Reviewed by the YouCalc Team · Last reviewed

Spot a translation issue, a calculation issue, or have a suggestion? Let us know.

More calculators like this. Pick the next one.