π’ Number Base Converter
Enter a number in any base (binary, octal, decimal, hexadecimal) and instantly see its equivalent in all other bases.
How to Use the Number Base Converter
The Number Base Converter converts integers between four common numeral systems: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Enter your number in the Input Number field, select the base of your input from the From Base dropdown, and click Convert. The equivalent value in all four bases appears in the output grid. For example, entering 255 in decimal (base 10) produces 11111111 in binary, 377 in octal, and FF in hexadecimal.
Hexadecimal output uses uppercase letters (AβF). This tool is useful for computer science students learning number systems, developers working with low-level code or binary protocols, designers reading hex color codes, and anyone debugging bit manipulation. The tool validates that your input is a valid number in the selected base β for example, entering 9 as a binary number will return an error, since binary only allows 0 and 1. All conversion uses JavaScript's built-in parseInt(n, base) and n.toString(base) functions.
Frequently Asked Questions
What is binary (base 2)?
βΊ
Binary is a numeral system that uses only two digits: 0 and 1. It is the fundamental language of computers because electronic circuits have two states: off (0) and on (1). Every number, character, image, and program in a computer is ultimately stored and processed as a sequence of binary digits (bits). For example, the decimal number 10 is 1010 in binary.
What is hexadecimal (base 16)?
βΊ
Hexadecimal (hex) uses 16 symbols: 0β9 for values 0β9 and AβF (or aβf) for values 10β15. One hex digit represents exactly 4 binary bits, so two hex digits represent one byte (8 bits). Hexadecimal is widely used in programming for memory addresses, color codes (#FF5733), binary file editing, network MAC addresses, and encoding byte sequences compactly.
Why do computers use binary instead of decimal?
βΊ
Computers use binary because electronic circuits naturally operate in two states: voltage present (1) or absent (0). Designing circuits that reliably distinguish 10 states (0β9) is much more complex and error-prone than distinguishing 2. Binary arithmetic also maps cleanly to Boolean logic (AND, OR, NOT), which forms the basis of all digital computation.
What is octal (base 8) used for?
βΊ
Octal uses digits 0β7. Each octal digit represents exactly 3 binary bits. Octal was popular on older computer systems that used 12-bit, 24-bit, or 36-bit word sizes. Today its most common use is Unix file permission notation β for example, chmod 755 sets permissions as 111 101 101 in binary (read/write/execute for owner, read/execute for group and others).