Binary / Decimal / Hex / Octal Converter

Enter a number in any base and all other representations update instantly. Supports unsigned integers of any size.

Runs in your browser · No data sent anywhere
Binary
Base 2 · digits: 0–1
0b
Octal
Base 8 · digits: 0–7
0o
Decimal
Base 10 · digits: 0–9
no prefix
Hexadecimal
Base 16 · digits: 0–F
0x

Quick reference table

DecimalBinaryOctalHex

Frequently Asked Questions

Why do computers use binary?

Electronic components naturally represent two states: on (1) and off (0). Binary maps perfectly to these two states, making it the foundation of digital computing. Hexadecimal is used as a human-friendly shorthand for binary — each hex digit represents exactly 4 binary bits.

How do I convert binary to decimal manually?

Each binary digit position represents a power of 2 (right to left: 1, 2, 4, 8, 16…). Multiply each digit by its positional value and sum them. Binary 1010: (1×8) + (0×4) + (1×2) + (0×1) = 10.

How do I convert decimal to hexadecimal?

Repeatedly divide by 16 and record remainders. Remainders 10–15 become A–F. Or: convert to binary first (4 bits per nibble), then group into 4-bit chunks and convert each to hex. For 255: 11111111 → FF.

What is octal used for?

Octal is used in Unix/Linux file permissions (chmod). Each octal digit (0–7) represents 3 binary bits. A permission of 755 means: owner = 7 (rwx), group = 5 (r-x), others = 5 (r-x).