Number Base Converter
Convert between binary, octal, decimal, and hexadecimal in real time.
Includes bit pattern visualization.
About
A free online tool that converts binary, octal, decimal, and hexadecimal numbers in real time. It features an interactive bit pattern visualizer where you can click individual bits to toggle them and see the result instantly.
Perfect for IT certification exam prep, programming study, and firmware development.
How to Use
Select Input Base
Choose the number base of the value you want to convert from the dropdown.
Enter a Value
Type a number in the input field and all four bases are shown instantly, with the bit pattern visualized below.
Copy or Toggle Bits
Click the copy icon next to any result. Click individual bit cells to toggle them and explore bit manipulation interactively.
Glossary
- Binary (Base 2)
- A number system using only 0 and 1. The fundamental representation inside computers.
- Octal (Base 8)
- A base-8 number system using digits 0–7. Commonly used in Unix file permissions (e.g., chmod 755).
- Decimal (Base 10)
- The standard base-10 system using digits 0–9, used in everyday human counting.
- Hexadecimal (Base 16)
- A base-16 system using digits 0–9 and letters A–F. Used in color codes (#FF0000) and memory addresses.
- Bit
- A single binary digit (0 or 1). The smallest unit of information in computing.
- Byte
- A group of 8 bits. Can represent values from 0–255 (decimal) or 00–FF (hexadecimal).
- MSB (Most Significant Bit)
- The leftmost bit in a binary number, having the greatest positional value.
- LSB (Least Significant Bit)
- The rightmost bit in a binary number, determining whether the number is odd or even.
Calculation Methods & Conversion Rules
Hexadecimal to Decimal Conversion
Hexadecimal uses 10 digits (0-9) and 6 letters (A-F) to represent values. A corresponds to 10, B to 11, and F to 15.
Example: Converting Hexadecimal "2A" to Decimal:
The 1st digit "A" is 10 in decimal.
The 2nd digit "2" represents two 16¹ (16), so 2 × 16 = 32.
Adding them up: 32 + 10 = 42.
Decimal, Hex, and Binary Reference Table (0-15)
| DEC | HEX | BIN |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| 10 | A | 1010 |
| 11 | B | 1011 |
| 12 | C | 1100 |
| 13 | D | 1101 |
| 14 | E | 1110 |
| 15 | F | 1111 |
FAQ
- Q.Can I convert negative numbers?
- This tool supports unsigned (non-negative) integers. Two's complement representation for negative numbers is not available in the current version.
- Q.Is my data sent to a server?
- No. All conversions use JavaScript's built-in parseInt() and toString() functions entirely in your browser.
- Q.What is the maximum number I can convert?
- Up to JavaScript's maximum safe integer: 2⁵³ - 1 = 9,007,199,254,740,991.
- Q.Can I convert decimal fractions?
- The current version supports integers only. IEEE 754 floating-point representation may be added in a future update.
- Q.How many bit widths does the visualizer support?
- You can switch between 8-bit, 16-bit, and 32-bit display modes.
Use Cases
📝 IT Certification Prep
Practice base conversion problems for CompTIA, CCNA, and other exams.
💻 Programming Study
Understand bit masks, shift operators, and bitwise operations visually.
🎨 Web Development
Convert CSS hex color codes to RGB decimal values and vice versa.
🔧 Firmware Development
Decode register values and memory dumps in hexadecimal.
Send Feedback
Please let us know your thoughts to help us improve the tool.
Feedback is temporarily suspended
The server is busy or spam protection is active. Please try again later.