Base converter
Convert numbers between binary, octal, decimal and hexadecimal. Type in any field and all others update instantly.
Number bases explained
A number base or radix defines how many unique digits a number system uses. Decimal uses ten digits (0–9) and is the system humans use every day. Binary uses two digits (0 and 1) and is the native language of computers. Octal uses eight digits (0–7) and was historically used in computing as a shorthand for binary. Hexadecimal uses sixteen digits (0–9 plus A–F) and is widely used in programming for its compact representation of binary data.
Why programmers use hexadecimal
Every hexadecimal digit represents exactly four binary bits. This makes hex a natural shorthand for binary — the eight-bit byte 11111111 becomes simply FF in hex, and 10110100 becomes B4. Web colors use hex — #FF5733 is a shade of orange. Memory addresses in low-level programming are written in hex. CPU registers, network packet data, and file format specifications all use hexadecimal because it is far more compact than binary while maintaining a direct relationship with the underlying bit patterns.
Binary and computer science
Binary is fundamental to how all digital computers work. Every piece of data — text, images, audio, video, programs — is ultimately stored as a sequence of 0s and 1s. A single binary digit is a bit. Eight bits make a byte, which can represent 256 different values (0 through 255). Understanding binary is essential for computer science, networking, cryptography, and low-level programming. The bit breakdown section on this tool shows exactly which bits are set for any number you enter.
Octal and Unix permissions
Octal is still actively used in Unix and Linux systems for file permissions. The chmod command uses octal notation — chmod 755 grants read, write, execute to the owner and read, execute to group and others. Each permission triplet (read, write, execute) maps perfectly to three binary bits, and three bits is exactly one octal digit. So 7 in octal is 111 in binary meaning all three permissions granted, and 5 is 101 meaning read and execute but not write.
Frequently asked questions
How do I convert decimal to binary?
Type the decimal number into the Decimal field and the binary appears instantly, along with octal and hex — all four fields stay in sync whichever one you edit. To do it by hand, divide the number by 2 repeatedly and read the remainders bottom-up: 13 → 6 r1 → 3 r0 → 1 r1 → 0 r1 gives 1101. The tool's bit breakdown also shows which powers of two are set, which is how the manual method actually works: 13 = 8 + 4 + 1.
How do I convert binary to hexadecimal quickly?
Group the binary digits into fours from the right and convert each group independently — because 16 is 2⁴, every hex digit maps to exactly one 4-bit group. So 10110100 splits into 1011 and 0100, which are B and 4: the answer is B4. No arithmetic through decimal is needed, which is why programmers read hex fluently as "binary shorthand". Type either form into the converter and watch the correspondence hold for any number.
What is 255 in hexadecimal?
FF — and that pair of digits appears everywhere in computing because 255 is the largest value one byte can hold (11111111 in binary, 377 in octal). It is why RGB colour channels run 0–255 and pure white is #FFFFFF, why old IPv4 subnet masks read 255.255.255.0, and why so many limits in file formats and protocols land on 255 or 256. When a maximum in software seems oddly specific, a power of two is usually hiding underneath.
Why do hex numbers start with 0x?
The 0x prefix is a convention from the C programming language in the early 1970s: 0x1A means "1A, interpreted as hexadecimal", distinguishing it from the decimal number 26 or the octal 032. It stuck so thoroughly that nearly every modern language uses it, alongside 0b for binary in newer ones. Web colours use a different marker for the same idea — the # in #FF5733 signals six hex digits. This converter accepts plain digits, so leave prefixes off when pasting.
Is octal still used for anything?
Less than it was, but it survives in one very visible place: Unix and Linux file permissions, where chmod 755 is octal for rwxr-xr-x. Octal was the dominant shorthand in the 1960s and 70s because machines like the PDP-8 used word sizes divisible by three bits. When the industry settled on 8-, 16- and 32-bit architectures — all divisible by four — hexadecimal's 4-bit grouping fit better and took over. Permissions kept octal because three permission bits per group maps perfectly to one octal digit.