Number Base Converter
Convert between binary, octal, decimal, hex, and any base from 2 to 36
About Number Base Converter
Number Base Converter rewrites a number from one positional base to another, for every base from 2 to 36, with digits 0–9 followed by the letters A–Z. It keeps a fractional part exact: when the fraction never ends in the new base, as 0.1 does in base 2, the first 40 digits appear followed by …, cut and not rounded. Binary, octal, decimal, and hexadecimal are always displayed, and Also convert to adds a fifth result when you pick a base other than 2, 8, 10, or 16 (base 36 at first). Negative numbers keep their minus sign. The answer changes with each keystroke, computed with exact fractions of whole numbers in this tab.
Example
A negative decimal number with a fractional part, From base on Decimal (10) and Also convert to on Base 3:
Value
-10.1
Results
Binary (2) -1010.0001100110011001100110011001100110011001… Octal (8) -12.0631463146314631463146314631463146314631… Decimal (10) -10.1 Hexadecimal (16) -A.1999999999999999999999999999999999999999… Base 3 -101.0022002200220022002200220022002200220022…
How to change the base of a number
- 1Write the number in "Value", with a point before the fractional part if there is one.
- 2Choose its current base in "From base"; "Decimal" is selected when the page opens.
- 3Pick a fifth result base in "Also convert to", for instance base 3 or base 7.
- 4Click "Copy" under a result; a value ending in … is copied with its 40 digits after the point.
Formats and limits
- Bases
- Any base from 2 to 36, both for the number you enter and for the results
- Digits
- 0–9, then A = 10, B = 11, and so on up to Z = 35
- Fractions
- Exact; a fraction that does not end stops after 40 digits, marked …
- Negative numbers
- Sign kept in front; not two's complement
Where your numbers are processed
Every step of the conversion runs in this tab with exact fractions of whole numbers, so nothing you type travels to our servers or is saved. Results are shown as page text, which Google receives if you switch on a translation in the language menu. A failed copy to the clipboard sends us the error, the tool's name, and your browser's name and version, never your number.
Frequently asked questions
Does 0.1 end in binary?
No. 0.1 is 1/10, and 10 has the prime factor 5, which 2 does not; a fraction ends in base b only when its reduced denominator has no prime factor outside those of b. The tool shows 40 digits of 0.0001100110011… instead of a rounded number.
Can I convert a number from base 3 to base 7?
Yes. Choose Base 3 in From base, type the number with the digits 0, 1, and 2, then choose Base 7 in Also convert to. The base 7 result appears next to the binary, octal, decimal, and hexadecimal ones.
How many digits does base 36 use?
36: 0 to 9, then A for 10, B for 11, and so on up to Z for 35. Upper and lower case are both accepted when you type; uncheck "Uppercase letters" to see the results in lower case.
Does it use two's complement for negative numbers?
No. The minus sign is kept and the size of the number is converted: -10.1 in decimal is -1010.0001100110011… in binary. Two's complement depends on a fixed number of bits, which this converter does not use.
Is 9 accepted in octal?
No. Octal uses only the digits 0 to 7, just as binary uses 0 and 1. A number with a digit its base lacks, or with two points, is refused, and a red line names the digits that base allows.
Tips and tricks
- ✓Check a conversion done by hand: type your answer in "Value", select its base in "From base", and compare with the number you started from.