# Number base converter

> The number base converter turns a whole number from any base between 2 and 36 into any other, including binary, octal, decimal, and hexadecimal. Decimal 255 is 11111111 in binary, 377 in octal, and FF in hex. Results stay exact even with hundreds of digits, and the repeated-division steps appear below each conversion.

Source: https://www.calterix.com/en-us/tool/number-base-converter/ · Updated 11/06/2026 · en-US

## How to convert between bases

To go from decimal to another base, divide by the target base until the quotient hits zero. The remainders, read from bottom to top, spell the answer. To go the other way, multiply each digit by the base raised to its position and add everything up.

```
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Remainders from bottom to top: 1101, so 13 is 1101 in binary
```

In hexadecimal, the digits 10 through 15 are written A through F. In larger bases the letters continue up to Z, which stands for 35 in base 36.

## Binary, octal, and hex equivalents

| Decimal | Binary | Octal | Hexadecimal |
| --- | --- | --- | --- |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
| 1000 | 1111101000 | 1750 | 3E8 |
| 4096 | 1000000000000 | 10000 | 1000 |

Hex is common in web colors and memory addresses, and binary shows the bits inside a byte. One hex digit always maps to exactly 4 binary digits.

## Precision, signs, and fractions

- Precision: the tool works with arbitrary-size integers, so a number like 2^100 converts exactly, with no rounding.
- Signs: a minus sign in front is kept, so −255 becomes −FF.
- Prefixes: 0x, 0b, and 0o are accepted at the start of the number.
- Fractions: not converted. Whole numbers only, because exact fraction conversion between bases can repeat forever.

> Use the swap button to flip the two bases, and the four-base view to see binary, octal, decimal, and hex for the same number at once.

Looking for file sizes in bytes, KB, or GB? Use the [unit converter](https://www.calterix.com/en-us/tool/unit-converter/). For another number system, try [Roman numerals](https://www.calterix.com/en-us/tool/roman-numerals/).

## Frequently asked questions

### How do I convert decimal to binary?

Divide the number by 2 over and over and write down each remainder. Read the remainders from bottom to top: 13 becomes 1101.

### How do I convert hex to decimal?

Multiply each digit by 16 raised to its position and add the results. FF is 15 × 16 + 15 = 255.

### What is the largest base the converter supports?

Base 36, which uses the digits 0 to 9 and the letters A to Z. The letter Z stands for 35.

### Does the converter lose precision with big numbers?

No. Integers of any practical size convert exactly, with no floating-point rounding.

### Can I convert a number with a decimal point?

No. Only whole numbers are converted, since fractions can turn into endless repeating digits in another base.
