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

Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal, and any custom base from 2 to 36. Type in any field to see live conversions with step-by-step work.


Decimal (Base 10)
Standard number system (0-9)
Digits: 0-9
Binary (Base 2)
Computer's native language — only 0 and 1
Digits: 0, 1
Octal (Base 8)
Often used in Unix file permissions (e.g., chmod 755)
Digits: 0-7
Hexadecimal (Base 16)
Colors (#FF5733), memory addresses, MAC addresses
Digits: 0-9, A-F
Custom Base
Any base from 2 to 36
Digits: 0-2

How It Works

Every positional number system works the same way: each digit's value depends on its position. In base b, the rightmost digit is multiplied by b0 = 1, the next by b1, then b2, and so on.

To convert from any base to decimal: multiply each digit by the base raised to its position power, then sum all values. For example, 10112 = 1×2³ + 0×2² + 1×2¹ + 1×2&sup0; = 8 + 0 + 2 + 1 = 11.

To convert from decimal to any base: repeatedly divide by the target base and collect the remainders in reverse order. For example, 11 ÷ 2 = 5 r 1, 5 ÷ 2 = 2 r 1, 2 ÷ 2 = 1 r 0, 1 ÷ 2 = 0 r 1 → reading remainders bottom-up gives 10112.

Number Systems

  • Decimal (Base 10): The standard number system we use daily. Uses digits 0-9.
  • Binary (Base 2): Computer's native language. Only uses 0 and 1.
  • Octal (Base 8): Uses digits 0-7. Common in Unix file permissions.
  • Hexadecimal (Base 16): Uses 0-9 and A-F. Compact representation of binary — each hex digit represents 4 bits.

Common Uses

  • Binary: Low-level programming, bitwise operations, computer architecture
  • Octal: File permissions in Unix/Linux (e.g., chmod 755)
  • Hexadecimal: Colors (#FF5733), memory addresses (0x1A2B), MAC addresses

Binary Bit Ranges

  • 1 bit: 0 or 1
  • 8 bits (1 byte): 0–255 unsigned, −128 to 127 signed
  • 16 bits: 0–65,535 unsigned, −32,768 to 32,767 signed
  • 32 bits: 0–4,294,967,295 unsigned, −2,147,483,648 to 2,147,483,647 signed

Quick Reference

Decimal Binary Octal Hex
0000
1111
21022
410044
81000108
10101012A
15111117F
16100002010
42101010522A
25511111111377FF
256100000000400100
1024100000000002000400
655351111111111111111177777FFFF

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