Number Base Converter

Convert numbers between different bases (binary, octal, decimal, hexadecimal, and more).

All Base Conversions

Binary (base 2) -
Octal (base 8) -
Decimal (base 10) -
Hexadecimal (base 16) -
Base 32 -
Base 36 -

Quick Reference

  • Binary (base 2): Uses digits 0-1
  • Octal (base 8): Uses digits 0-7
  • Decimal (base 10): Uses digits 0-9
  • Hexadecimal (base 16): Uses 0-9 and A-F
  • Base 32: Uses 0-9 and A-V
  • Base 36: Uses 0-9 and A-Z

What Is Number Base Conversion?

Number base conversion transforms a number from one positional numeral system to another. In computing, the most important bases are binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Understanding these systems is fundamental to programming, networking, cryptography, and hardware engineering.

Common Number Bases

BaseNameDigitsUse Cases
2Binary0, 1CPU instructions, bitwise operations, network masks
8Octal0-7Unix file permissions (e.g., chmod 755)
10Decimal0-9Human-readable numbers, mathematics
16Hexadecimal0-9, A-FMemory addresses, colors (#FF0000), MAC addresses
32Base32A-Z, 2-7TOTP tokens, case-insensitive encoding
36Base360-9, A-ZShort URLs, compact identifiers
64Base64A-Z, a-z, 0-9, +, /Binary data encoding in text (email, APIs)

How Conversion Works

Converting between bases follows a two-step process:

  1. Convert to decimal: Multiply each digit by its positional value. For example, binary 1011 = 1ร—2ยณ + 0ร—2ยฒ + 1ร—2ยน + 1ร—2โฐ = 8 + 0 + 2 + 1 = 11.
  2. Convert from decimal: Repeatedly divide by the target base and collect remainders. For example, 11 in hex: 11 รท 16 = 0 remainder 11 (B), so 11 decimal = B hex.

Common Use Cases

  • Web Development: Convert between hex color codes and RGB values.
  • Networking: Convert IP addresses and subnet masks between decimal and binary.
  • Debugging: Read memory dumps and register values in hexadecimal.
  • Permissions: Understand and calculate Unix file permission octals.
  • Education: Learn and practice number system conversions.

How to Use This Tool

  1. Enter a number in any supported base (binary, decimal, hex, octal).
  2. Select the source base from the dropdown.
  3. View instant conversions to all other bases.
  4. Click any result to copy it to your clipboard.

Why Use This Tool?

  • Convert between binary, decimal, hexadecimal, and octal instantly.
  • Essential for low-level programming and debugging.
  • All conversions run in your browser โ€” fast and accurate.
  • Supports large numbers and shows all bases simultaneously.

Frequently Asked Questions

Why do computers use binary?

Digital circuits have two stable states (on/off, high/low voltage), which naturally maps to binary (0 and 1). Every piece of data in a computer โ€” numbers, text, images, programs โ€” is ultimately stored and processed as binary.

Why is hexadecimal so common in programming?

Each hex digit represents exactly 4 binary bits, making it a compact and readable way to express binary values. A byte (8 bits) is represented by exactly 2 hex digits, so a 32-bit value is just 8 hex characters instead of 32 binary digits.