Convert between binary, decimal, hexadecimal, octal
Last updated: November 14, 2026
Binary, octal, decimal, and hexadecimal
A number base (radix) determines how many unique digits are used and the positional value of each digit. Humans naturally use base 10 (decimal). Computers use base 2 (binary) internally.
Binary (base 2): Only 0 and 1. Each position represents a power of 2. 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal. Used in all digital electronics and computing.
Octal (base 8): Digits 0–7. Each octal digit represents 3 binary digits. 17₈ = 1×8 + 7 = 15. Used in Unix file permissions (chmod 755).
Hexadecimal (base 16): Digits 0–9 and A–F (A=10, B=11, ..., F=15). FF₁₆ = 15×16 + 15 = 255. Used in color codes (#FF5733), memory addresses, and computer debugging. Each hex digit represents 4 binary bits.
Color codes: HTML color #FF5733 means R=255, G=87, B=51 in decimal. Hex colors are compact — 6 hex digits represent a full RGB color.
Short answers to common questions
Binary is base-2 number system using only 0 and 1. Computers use binary.
255 decimal = 11111111 binary = FF hexadecimal
In color codes (#FF5733), memory addresses and debugging.
How to Use? Enter number, select source base and click convert. Shows equivalent in all bases.
Base 2 using digits 0 and 1
Base 8 using digits 0-7
Base 10 using digits 0-9
Base 16 using 0-9 and A-F