Categories
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
Overview
Converts numbers between binary, octal, decimal, and hexadecimal.
Uses BigInt internally, so it accurately converts numbers with many digits, even where JavaScript's Number type would lose precision.
Specify the base of the number you enter, and the result in every other base is displayed at once.
Usage
- 1
Select the base (2/8/10/16) of the number you are entering in "From base".
- 2
Enter the number in the input field.
- 3
Click "Convert" to see the result in binary, octal, decimal, and hexadecimal.
Example
Input
255 (decimal)
Output
11111111 / 377 / 255 / FF
Use Cases
Checking decimal, binary, and hexadecimal values against each other when doing bit manipulation or flag management in code
Converting a specific base notation, such as a color code (hex) or file permission (octal), into decimal to understand its meaning
Converting between bases without losing precision when working with a system that handles large numbers
FAQ
Can I convert negative numbers?
Yes. Enter a leading "-" to get a signed result.
Does it handle numbers with many digits correctly?
Yes. It uses BigInt internally, so it converts large numbers accurately even where JavaScript's Number type would lose precision.
Can I enter hexadecimal with lowercase a-f?
Yes, both lowercase and uppercase are accepted. The hexadecimal result is always displayed in uppercase.
Notes
A negative number can be entered with a leading "-".
Hexadecimal accepts lowercase a-f, but the result is always displayed in uppercase.
Entering a character that doesn't fit the specified base (for example, a digit of 2 or more for binary) results in an error.
Related Tools
Encode and decode text to and from URL encoding.
Calculate the octal and symbolic notation for chmod by selecting owner, group, and other permissions.