Number Base Converter

Convert integers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Also displays a 16-bit binary representation for values under 65536.

Number Base Reference
DecimalBinaryOctalHex
0000
1111
21022
410044
81000108
10101012A
15111117F
16100002010
25511111111377FF
256100000000400100
1024100000000002000400
655351111111111111111177777FFFF

Code prefixes: binary = 0b, octal = 0o, hex = 0x. Powers of 2 are key: 2⁸=256, 2¹⁰=1024 (1 KB), 2¹⁶=65536.

How to use
Selecting the input base

Click the base of your input number before typing. For example, if you have a hex number like 1A3F, click Hexadecimal first.

Hexadecimal input

You can type digits 0–9 and letters A–F (case insensitive). Letters are automatically uppercased in the output.

16-bit view

For values 0–65535, a bit-level breakdown is shown with the bit position number above each bit. Active bits (1) are highlighted.

Formula
Binary: base 2 (0,1) Octal: base 8 (0–7) Decimal: base 10 (0–9) Hex: base 16 (0–9, A–F)
Tips
  • In programming, binary is prefixed with 0b, octal with 0o, and hex with 0x.
  • 255 in decimal = 0xFF in hex = 11111111 in binary (all 8 bits set).
  • Hexadecimal is widely used in web colours: #FF5733 = R:255 G:87 B:51.