Number Base Converter

Convert numbers between Binary, Decimal, Octal, and Hexadecimal instantly.

Free Runs in your browser

How to use

  1. 1 Type your number in any of the four fields: Binary (base 2), Octal (base 8), Decimal (base 10), or Hexadecimal (base 16).
  2. 2 All other fields update instantly as you type — no button required.
  3. 3 Select and copy any output field value to use it in your code or shell command.
  4. 4 Use it for bit manipulation, color hex values, memory addresses, or any base conversion between these four bases.

Key features

  • Converts between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16)
  • Real-time: type in any field and all others update instantly
  • Validates input per base — shows a clear error for invalid characters
  • Useful for low-level programming, color hex values, and bitwise operations

Binary, Octal, Decimal, Hexadecimal

A number base (or radix) defines how many distinct digits a system uses. Decimal (base 10) uses 0–9. Binary (base 2) uses 0–1. Octal (base 8) uses 0–7. Hexadecimal (base 16) uses 0–9 plus A–F. The value they represent is identical — only the notation changes.

Computers fundamentally operate in binary. Hex and octal exist as compact shorthands: one hex digit represents exactly 4 bits, so 0xFF is more readable than 11111111 in binary. Octal maps to file permission bits (3 bits per digit), which is why Unix permissions are written as 755 or 644.

Common Use Cases

CSS color values

Convert hex color codes (e.g. #3b82f6) to decimal RGB channels or vice versa.

Unix file permissions

Convert octal chmod values (755, 644) to binary to understand exactly which bits are set.

Memory and address notation

Convert between hex memory addresses and decimal offsets when reading assembly or debugging.

Bitmask and flag operations

Verify bitmask values in binary to check which flags are set in a permission or status integer.

Network and protocol work

IPv6 addresses, MAC addresses, and many protocol fields are expressed in hexadecimal.

CS study and exam prep

Practice conversion between all four bases for computer architecture, networking, or OS coursework.

Where Each Base Appears in Practice

BasePrefix in codeTypical domain
Decimal (10)noneEverything human-facing: counts, IDs, prices
Binary (2)0bBitmasks, flags, microcontroller programming
Octal (8)0o (or 0 in C)Unix file permissions (chmod 755)
Hex (16)0xColors (#ff0000), memory addresses, byte values