Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal and any base from 2 to 36. Handles very large integers exactly, and negative numbers.
About Number Base Converter
The Number Base Converter shows a number in binary, octal, decimal and hexadecimal at once, and in any base from 2 to 36.
Example
Decimal 1000 is 1111101000 in binary, 1750 in octal and 3e8 in hexadecimal.
Huge numbers stay exact
Many calculators lose precision above 2^53; this one keeps every digit.
Negative numbers
Shown with a minus sign: -10 is -1010 in binary.
Where you see these bases
Hexadecimal in colour codes like #ff8800, memory addresses and byte values; binary for bit masks.
Good to know
Whole numbers only; fractions are not converted. Letters can be upper or lower case.
Private
Everything runs in your browser. Nothing you paste is uploaded.
Convert by hand
To get decimal, multiply each digit by the base raised to its position and add: binary 1011 is 8 + 0 + 2 + 1 = 11. To go the other way, divide by the base again and again and read the remainders from bottom to top.
Binary to hex shortcut
Group binary digits in fours from the right and convert each group: 1101 0110 is D6. For octal, use groups of three.
How to use Number Base Converter
- Type a whole number in the binary, octal, decimal or hexadecimal field.
- Watch the other fields update.
- To use another base, set the Custom base (2 to 36) and read or type the value in the custom field.
- Copy the value you need.
Help & FAQ
How do we convert decimal to binary?
Type the decimal number in the decimal field. For 1000 the binary field shows 1111101000.
How do we convert hexadecimal to decimal?
Type the hexadecimal value in the hexadecimal field. FF gives 255 and 3e8 gives 1000.
Which bases are supported?
Binary, octal, decimal and hexadecimal, plus one custom base from 2 to 36 that uses the digits 0 to 9 and the letters a to z.
Does it handle very large numbers?
Yes, exactly. 9007199254740993 (2^53 + 1) converts to hexadecimal 20000000000001 without rounding, which many floating-point calculators cannot do.
Does it support negative numbers?
Yes. Negative numbers are shown with a minus sign, for example decimal -10 is -1010 in binary and -a in hexadecimal. This is not a two's complement bit pattern.
Does it convert fractions or decimal points?
No. It converts whole numbers only.
Are uppercase and lowercase letters different?
No. FF and ff are the same value. The output uses lowercase letters.
What is 1000 in base 36?
rs, because r = 27, s = 28 and 27 x 36 + 28 = 1000.
What is octal used for?
Mostly for Unix file permissions, where each digit is three bits: 7 is rwx, 5 is r-x and 4 is r--. 755 means rwxr-xr-x.
What is hexadecimal used for?
Colours, memory addresses, byte values, MAC addresses and hashes. Two hex digits make one byte.
How do we convert a two's complement number?
This tool shows signed values with a minus sign. For a two's complement pattern, convert the positive value, then invert the bits and add one at your chosen bit width.
Is our input sent anywhere?
No. The conversion runs in your browser as you type.