Free online tools to generate, calculate,
convert, format, encode, and play.
 

Binary/Decimal/Hex/Octal Converter

Convert numbers between binary, decimal, hexadecimal, and octal instantly. Type in any field to see all conversions update in real time.


Decimal (Base 10)
No prefix
Digits: 0-9
Binary (Base 2)
Prefix: 0b
Digits: 0, 1
Octal (Base 8)
Prefix: 0o
Digits: 0-7
Hexadecimal (Base 16)
Prefix: 0x
Digits: 0-9, A-F

How It Works

Every positional number system represents values using digits multiplied by powers of the base. In base b, the rightmost digit is multiplied by b0 = 1, the next by b1, then b2, and so on.

Binary (Base 2) uses only 0 and 1. It is the native language of computers — every bit in memory is a binary digit. For example, 10112 = 1×8 + 0×4 + 1×2 + 1×1 = 1110.

Octal (Base 8) groups every 3 binary digits into one octal digit. Commonly used in Unix file permissions (e.g. 755 = rwxr-xr-x).

Hexadecimal (Base 16) groups every 4 binary digits into one hex digit. Widely used in programming for memory addresses, color codes (#FF0000), and byte values.

To convert between bases: the tool first converts the input to decimal (by summing digit × baseposition), then converts from decimal to each target base (by repeated division, reading remainders in reverse).


Quick Reference

Decimal Binary Octal Hex
0000000
1000111
7011177
81000108
10101012A
15111117F
16100002010
12711111111777F
25511111111377FF
256100000000400100
655351111111111111111177777FFFF

Common Use Cases

Programming

  • HTML/CSS color codes (hex: #FF5733)
  • Memory addresses and pointers (0x7FFF)
  • Bitwise operations and flags
  • Byte-level data inspection

Systems

  • Unix file permissions (octal: 0o755)
  • Network subnet masks (binary)
  • ASCII/Unicode character codes
  • Register values and debugging


Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with