Binary Converter
Convert numbers between the four most common numeral bases used in computing: binary (base 2), decimal (base 10), hexadecimal (base 16), and octal (base 8). Type in any field and all others update instantly. Hexadecimal and binary are essential for working with memory addresses, color codes, bitwise operations, and low-level hardware programming.
What this tool does
This converter handles the four number bases you'll actually encounter in computing work: decimal (base 10, what humans count in), binary (base 2, what computers operate on), hexadecimal (base 16, how memory and color values are written), and octal (base 8, how Unix file permissions are expressed). Type a value in any field and all three others update immediately. It also shows the bit-grouped binary display, the 32-bit signed interpretation, the bit length, and the ASCII character if the value falls in the printable range.
How to use it
- Type your number into whichever base field you're starting from — decimal, binary, hex, or octal.
- The other three fields update as you type. No button needed.
- Hex input accepts both
FFand#FF(with the hash, useful for web colors). Binary accepts0bprefix. Octal accepts0oprefix. - Scroll down to the extras panel to see the signed 32-bit value, bit length, and ASCII character for the number.
- Use the individual Copy buttons to grab a specific base, or Copy All to copy all four values at once.
Where you'll use this
- Subnet masks: The mask
255.255.255.0is11111111.11111111.11111111.00000000in binary — 24 network bits followed by 8 host bits. Converting masks to binary makes CIDR notation intuitive rather than magical. - Web colors:
#1A2B3Cis three hex pairs —1A(red = 26),2B(green = 43),3C(blue = 60). Paste the hex value here to see what each channel actually is. - Unix permissions:
chmod 755meansrwxr-xr-x. Each digit is an octal number: 7 =111(rwx), 5 =101(r-x). The binary breakdown makes it click. - Bitwise debugging: When you're reading register dumps, error bitmasks, or flags from system APIs, hex is the format they come in. Convert to binary to see exactly which bits are set.
- Memory addresses: Pointers and addresses are shown in hex in debuggers and crash dumps. Converting to decimal or binary helps verify alignment (addresses divisible by 4, 8, 16, etc.).
Frequently Asked Questions
What is two's complement and why does it matter?
Two's complement is how CPUs represent negative integers in binary. Instead of using a sign bit naively, you invert all bits and add 1. So −1 in 8-bit two's complement is 11111111 — which looks like 255 unsigned. The reason it's done this way: the same addition circuit works for both positive and negative numbers, no special-casing required. This tool shows the 32-bit signed value in the extras panel so you can see how a given binary pattern would be interpreted as a signed integer.
Why do developers use hex instead of binary for large values?
One hex digit represents exactly 4 binary bits. A 32-bit value needs 32 binary digits but only 8 hex digits — much easier to read and copy accurately. And the conversion is mechanical: 0=0000, A=1010, F=1111. Once you've memorized those, you can read hex dumps directly without a tool.
When does octal come up in real work?
Almost exclusively in Unix/Linux file permissions. chmod 755 sets owner to 7 (rwx = 111), group to 5 (r-x = 101), others to 5. Each octal digit maps to exactly 3 bits — read, write, execute. Outside of permissions, octal has largely been replaced by hex in modern computing. If you see a number starting with a bare 0 in C or JavaScript, watch out — that's interpreted as octal by the parser.
What is the ASCII table for in this tool?
When you enter a decimal value between 32 and 126, the extras panel shows the corresponding ASCII character. This helps when reading character codes in source code or debugging strings at the byte level. 65 = A, 97 = a, 48 = 0. The ASCII reference table at the bottom covers all 95 printable characters with their decimal and hex codes side by side.
Want the full explanation? Read the guide: Binary, Hex, and Decimal: A Practical Guide for IT Pros →