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.
Dec
255
Hex
FF
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
1
1
1
1
1
1
1
1
Positional breakdown (base 10)
Digit
Value
Place
Base^Place
Contribution
2
2
2
10^2 = 100
200
5
5
1
10^1 = 10
50
5
5
0
10^0 = 1
5
Total
255
How number base conversion works
Every positional numeral system works the same way: each digit position represents a power of the base. In base 10 (decimal), the number 255 means 2 × 10² + 5 × 10¹ + 5 × 10⁰ = 200 + 50 + 5. In base 16 (hexadecimal), 'FF' means 15 × 16¹ + 15 × 16⁰ = 240 + 15 = 255. Digits above 9 are written as letters: A=10, B=11 … F=15.
To convert any number, first find its decimal value by summing digit × base^place from right to left. Then convert that decimal to the target base by repeatedly dividing by the target base and collecting the remainders in reverse. This converter handles bases 2 through 36 — base 36 uses all ten digits plus all 26 letters.
Why does hexadecimal use letters?
Base 16 needs 16 distinct symbols but our numeral set only has 10 digits (0–9). The letters A–F fill in values 10–15, giving a compact notation where every byte (0–255) fits in exactly two hex digits.
What is the fastest way to convert binary to hexadecimal?
Group the binary digits from the right into nibbles (sets of 4), pad the leftmost group with leading zeros if needed, then replace each nibble with its hex digit. For example, 11111111 → 1111 1111 → F F = FF.
Why is base 36 useful?
Base 36 is the largest base that uses only the standard alphanumeric characters (0–9, A–Z). It is often used to create short, URL-safe identifiers — a six-character base-36 string can encode over two billion distinct values.
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.
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.
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.
Spot a translation issue, a calculation issue, or have a suggestion? Let us know.