Number Base Converter — Binary, Octal, Decimal, Hex

Convert any integer between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Just type in any field — all others update instantly.

Number bases explained

BaseNameDigitsCommon use
2Binary0, 1Digital circuits, CPUs, file storage
8Octal0–7Unix file permissions (chmod 755)
10Decimal0–9Everyday arithmetic
16Hexadecimal0–9, A–FMemory addresses, CSS colors (#FF0000)

Hexadecimal digits A–F represent the decimal values 10–15. For example, 0xFF = 15×16 + 15 = 255 in decimal.

Frequently Asked Questions

How do I convert decimal to binary?
Divide the decimal number repeatedly by 2, recording the remainder each time. Read the remainders bottom to top. Example: 13 → 1101 in binary. This converter does it instantly for any positive integer.
What is hexadecimal used for in programming?
Hexadecimal (base 16) is widely used in programming because it compactly represents binary data — one hex digit = 4 bits. It appears in memory addresses (0x7FFFFFFF), color codes (#3b82f6), and bytecode.
What does chmod 755 mean in octal?
In Unix permissions, 755 is octal: owner gets 7 (read+write+execute), group gets 5 (read+execute), others get 5 (read+execute). Each digit is a 3-bit binary group: 7 = 111, 5 = 101.