Number Base Converter
A number base, or radix, is how many distinct digits a positional number system uses before it carries to the next place. Decimal uses ten digits, binary uses two, and hexadecimal uses sixteen. This converter takes a value written in one base and rewrites it in another, supporting any base from two to thirty-six, where digits beyond nine use the letters A through Z. It works in two stages: it reads the input by multiplying each digit by its place value in the source base to get a plain decimal value, then repeatedly divides that value by the target base, collecting remainders, to write it in the new base. Both stages are exact integer operations, so the conversion is precise. Programmers, students and digital-electronics enthusiasts convert between bases constantly: binary and hexadecimal for low-level computing, decimal for everyday numbers, and other bases for puzzles and encoding. Enter the value, choose the source and target bases, and read the result immediately. The bases are small whole numbers and the value is a digit string, so no decimal formatting applies. Every conversion here is computed deterministically from the place-value rule shown below, with a worked example that reconciles exactly to the converter so you can follow each step yourself.
A base converter rewrites a value from one radix to another by place value. The decimal value 255 converted to base 16 is FF.
Number Base Converter formula
value = sum of (digit x base^position)
read source: convert to decimal by place value
write target: repeated division, collect remainders
bases 2 to 36, digits 0-9 then A-Z
conversion is exact for integers
To read a number in any base, multiply each digit by the base raised to its position and add. To write a decimal value in a target base, divide repeatedly by the base and record the remainders from last to first.
Worked example
Convert the decimal value 255 to base 16 (hexadecimal).
- 255 divided by 16 = 15 remainder 15 (digit F)
- 15 divided by 16 = 0 remainder 15 (digit F)
- Reading remainders from last to first gives FF
255 in base 16 is FF. These are the converter's default inputs, so the result above matches the widget exactly.
Common base equivalents
The same value across bases.
| Decimal | Binary | Hex |
|---|---|---|
| 10 | 1010 | A |
| 16 | 10000 | 10 |
| 100 | 1100100 | 64 |
| 255 | 11111111 | FF |
| 256 | 100000000 | 100 |
Computing and number-system reference: US National Institute of Standards and Technology (NIST).
Number Base Converter: frequently asked questions
What is a number base?
A number base, or radix, is the count of distinct digits a positional system uses. Decimal is base ten with digits zero through nine, binary is base two with digits zero and one, and hexadecimal is base sixteen using zero through nine and A through F. The base sets the place values.
What bases can this convert?
Any base from two to thirty-six, in either direction. Bases above ten use letters for the extra digits: A for ten, B for eleven, and so on up to Z for thirty-five. Enter the value, the source base and the target base to convert between any of them.
How does conversion work?
First the value is read into a plain decimal number by multiplying each digit by the source base raised to its position. Then that decimal number is rewritten in the target base by dividing repeatedly by the base and collecting the remainders, which become the new digits from last to first.
Why are binary and hexadecimal common in computing?
Computers store data as bits, which are base-two digits, so binary maps directly onto hardware. Hexadecimal is a compact shorthand because each hex digit represents exactly four bits, making long binary strings far easier to read and write.
How do I convert 255 to hexadecimal?
Divide 255 by 16 to get 15 remainder 15, then divide 15 by 16 to get 0 remainder 15. Each remainder of 15 is the hex digit F, so reading them gives FF. That is why 255 in base 16 is FF.
Official sources
- Mathematical functions and integer-sequence reference data (Digital Library of Mathematical Functions): US National Institute of Standards and Technology (NIST). As at 25 June 2026.
Reviewed by the CalculatorHub team, edited by James Graham, 25 June 2026. See our methodology. This is general information, not financial, tax, legal or investment advice.