About the Number Base Converter
The Number Base Converter takes a whole number written in binary, octal, decimal, or hexadecimal and shows it in all four bases at once. A custom base field covers anything else from base 2 to base 36.
How it works
In any positional number system, each digit is multiplied by the base raised to the power of its position, counting from 0 on the right. Hex 1A3F is 1x16^3 + 10x16^2 + 3x16 + 15 = 6719 in decimal. The converter first reads your input in the selected base this way to get its value.
It then writes that value in each target base by repeatedly dividing by the base and collecting the remainders. Digits above 9 are written as uppercase letters, A for 10 up to Z for 35. The four standard bases are always shown, and the custom base field adds one more output in any base from 2 to 36.
How to use
- 1
Choose the base your number is written in from the Input base menu.
- 2
Type the number into the Value field.
- 3
Read the Binary, Octal, Decimal, and Hexadecimal results, and click the copy icon on any of them.
- 4
For another base, enter a number from 2 to 36 in the Custom base field.
Worked examples
The default value
Converting 255, the largest value of one byte.
With custom base 36, 255 becomes 73 (7x36 + 3).
Hex to decimal
Decoding a value from a hex dump.
Binary flags
Reading a bit mask from a config file.
Frequently asked questions
Why is hexadecimal commonly used in programming?+
Each hex digit represents exactly four bits, so hex is a compact, readable way to write binary values such as memory addresses, byte data, and color codes.
What letters are used for digits above 9 in hexadecimal?+
A through F represent the values 10 through 15. In bases up to 36, the letters continue to Z for 35.
Can I convert decimal fractions like 10.5?+
No. The converter handles whole numbers only, and anything after the decimal point is ignored.
Why does my input show a smaller number than expected?+
The value is read up to the first character that is not valid in the selected base. For example, typing 129 with Binary selected reads only the 1. Check that the input base matches your number.
Does it support very large numbers?+
Results are exact up to 9,007,199,254,740,991 (2^53 - 1). Beyond that, the last digits can be wrong because of JavaScript number precision.