Convert numbers between binary, decimal, hexadecimal, and octal bases.
Our free Number Base Converter instantly converts any number between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Type a number in any base and see all four representations update simultaneously — an essential tool for programmers, computer science students, and anyone working with digital systems.
A number base (or radix) defines how many unique digits a number system uses. The decimal system we use in everyday life is base 10, meaning it uses ten digits: 0 through 9. Computers, however, operate in binary (base 2), using only 0 and 1, because electronic circuits have two states: on and off.
Hexadecimal (base 16) is widely used in programming because it provides a compact way to represent binary data. One hex digit represents exactly four binary bits, so a byte (8 bits) can be written as just two hex digits. This is why you see hex values everywhere in programming: color codes (#FF5733), memory addresses (0x7FFF), and byte-level data inspection.
Octal (base 8) uses digits 0–7 and was historically used in computing because it maps cleanly to groups of three binary digits. While less common today, it still appears in Unix/Linux file permissions (e.g., chmod 755) and some legacy systems.
The converter is designed to be as simple as possible. Here's how to use it:
When working with hexadecimal, remember that each hex digit represents exactly 4 bits. So a 32-bit integer is always 8 hex digits, and a 64-bit value is 16 hex digits. This makes hex a natural shorthand for binary — much easier to read and write than a long string of 0s and 1s.
For binary, it helps to group digits in sets of 4 or 8 when reading large values. For example, the binary number 11111111 is easier to read as 1111 1111, which you can immediately recognize as two hex Fs (0xFF) or decimal 255 — the maximum value of a single byte.
When entering hexadecimal values, you can use either uppercase (A–F) or lowercase (a–f) letters. The converter accepts both and always outputs uppercase for consistency.
Most number base converters only let you convert from one specific base to another. This tool converts from any base to all four bases simultaneously, so you can see the full picture at once. This is especially useful when you're learning number systems and want to understand the relationship between binary, octal, decimal, and hex representations of the same value.
The converter works in real time as you type, with no "Convert" button to click. This makes it fast to use when you're in the middle of debugging code or working through a problem and need quick conversions without interrupting your flow.
Each output has its own copy button, so you can grab exactly the value you need in the format you need it, without selecting and copying text manually.
Your privacy is our priority. All processing happens entirely in your browser using JavaScript. No files, data, or inputs are ever uploaded to any server. Everything stays on your device, making this tool completely safe to use with sensitive content.