About the Number Base Converter
Convert numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Hexadecimal is the standard way to write color codes, MAC addresses, memory addresses, and most low-level computing values because every hex digit is exactly four binary bits, making it a compact view of the underlying binary. Useful for programmers, EE/CS students, anyone working with web colors, or anyone debugging a machine code dump.
How to use it
- Type a number into any of the four fields (binary, octal, decimal, hex).
- All four fields update in real time as you type.
- Valid characters are constrained per field — you can't type a '2' into the binary field, or 'G' into the hex field.
- Leading zeros are allowed and don't change the value.
Common base conversions
| Decimal 0 | Bin 0 / Oct 0 / Hex 0 |
| Decimal 10 | Bin 1010 / Oct 12 / Hex A |
| Decimal 16 | Bin 10000 / Oct 20 / Hex 10 |
| Decimal 100 | Bin 1100100 / Oct 144 / Hex 64 |
| Decimal 255 | Bin 11111111 / Oct 377 / Hex FF |
| Decimal 1024 | Bin 10000000000 / Oct 2000 / Hex 400 |
| #FF5733 (web color) | R 255, G 87, B 51 |
| Decimal 65535 | Hex FFFF (max 16-bit unsigned) |
Frequently asked questions
- Why is hexadecimal used so much in computing?
- Because each hex digit maps cleanly to exactly four binary bits. A 32-bit integer is exactly 8 hex digits — easy to read, easy to type, easy to spot patterns in. Binary is too long, decimal doesn't align with byte boundaries, octal aligns with 3-bit groups which doesn't match the modern 8-bit byte. Hex sits in the sweet spot.
- Are negative numbers supported?
- This converter focuses on non-negative whole numbers. Negative values in computing are represented as 'two's complement' which depends on the bit width (8-bit, 16-bit, 32-bit, etc.), so there isn't a single right way to display them without picking a width.
- What about base 64?
- Base 64 is an encoding for binary data using printable ASCII characters, not a numeric base in the same way as binary/octal/decimal/hex. It's used for email attachments and data URIs, and is a different tool than a number-base converter.
Related tools