Number Base Converter
Enter a number in any common base and instantly see its value in binary, octal, decimal and hexadecimal.
How it works and known limits
How conversion works
The tool parses your input using the source base, then prints the same integer in the other bases with JavaScript toString and parseInt. A 0x, 0b or 0o prefix is accepted, as are plain digits. Letters in hexadecimal are case-insensitive.
Limits of JavaScript numbers
JavaScript stores numbers as 64-bit floating point values, so integers above 2^53 lose precision. For very large values such as 256-bit hashes, the tool cannot represent the full number. Use a big-integer library when exact arbitrary-precision conversion matters.
Negative values and fractions
Negative integers are supported and keep their sign across bases. Fractional parts are not supported: the input is parsed as an integer, and a decimal point will produce an error or a truncated value.
How to convert between number bases (with screenshots)
Convert a number to decimal, binary, octal and hexadecimal at the same time.
Open the Number Base Converter
Open the Number Base Converter page. The number is where your work begins; the result appears on the right.
Enter your input
Enter a number in the input box. This example uses decimal 255.
Set the options
Choose Auto to detect the base from prefixes like 0x, 0b and 0o, or select one explicitly.
Run the tool
Click Convert to see every notation. The result lists the same value in decimal, binary, octal and prefixed hexadecimal.
Tip: Use the 0x, 0b or 0o prefix and leave the base on Auto for the fastest conversion.
Frequently asked questions
Which bases are supported?
Binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16).
Can I paste a value with a 0x prefix?
Yes. Prefixes such as 0x, 0b and 0o are recognised automatically.
Does it handle very large numbers?
Only up to the safe integer limit of 2^53. Larger values lose precision in JavaScript.
Is the input uploaded?
No. All conversion happens locally with built-in browser functions.
Page last reviewed: