Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal and Roman numerals, with step-by-step results. Free and instant, no signup.
Number bases
Other representations
Binary, octal, decimal and hex that stay in sync
Type into any of the four fields, binary, octal, decimal or hexadecimal, and the other three update to the same value. Each field accepts only its own digits and says so if you type something else, so a stray 8 in the octal box is caught immediately rather than silently truncated. Below the bases, the value also appears as a Roman numeral, in base 36, as space-separated bytes, and with its bit length, the number of bits needed to store it.
Arithmetic uses BigInt rather than JavaScript's floating-point numbers, so values past 2^53 (about 9 quadrillion) keep every digit. Many online converters quietly round anything larger, which shows up as a hex value whose trailing digits are wrong. Here a 128-bit hash or a 256-bit key converts exactly.
The converter works on non-negative whole numbers. There is no fractional part, no negative sign and no two's complement view; for those, a programmer's calculator is the right tool. Roman numerals only exist for 1 to 3999, so larger values show a dash there. Conversions run on the page as you type, with nothing submitted.
Frequently asked questions
How do I convert hex to decimal?
Type the hex value into the hexadecimal field, with or without uppercase letters and without a 0x prefix. The decimal field shows the result at once, along with binary and octal.
Why is the Roman numeral showing a dash?
Roman numerals have no symbol for zero and no standard form above 3999, so the converter only renders values from 1 to 3999.
Does it handle negative numbers or fractions?
No. Only non-negative integers are accepted. Negative values in binary depend on a chosen word size and two's complement, which is outside what this tool does.
Does it lose precision with very large numbers?
No. Values are held as BigInt, so a 64-bit or 256-bit integer converts digit for digit; the usual rounding above 2^53 does not occur.