Number Base Converter

Convert numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Useful for bitwise operations, low-level debugging, and encoding. Supports negative numbers and two's complement.

0b
0o
0x

Quick Reference

Dec
Bin
Oct
Hex
0
0000
0
0
1
0001
1
1
2
0010
2
2
3
0011
3
3
4
0100
4
4
5
0101
5
5
6
0110
6
6
7
0111
7
7
8
1000
10
8
9
1001
11
9
10
1010
12
A
11
1011
13
B
12
1100
14
C
13
1101
15
D
14
1110
16
E
15
1111
17
F

Number Systems

Binary
Base 2
Digits: 0-1
Prefix: 0b
Octal
Base 8
Digits: 0-7
Prefix: 0o
Decimal
Base 10
Digits: 0-9
Prefix: -
Hexadecimal
Base 16
Digits: 0-F
Prefix: 0x

Common Use Cases

  • Web colors: #FF5733 = RGB(255, 87, 51)
  • Unix permissions: 755 = rwxr-xr-x
  • Memory addresses: 0x7FFF5FBFF8C0
  • Network masks: 11111111.00000000

Conversion Examples

DecBinOctHex
10101012A
25511111111377FF
1024100000000002000400