Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal.

Computers think in binary, programmers read hexadecimal, Unix permissions use octal, and humans count in decimal. Converting between bases is a daily task in low-level programming, networking, color codes, and computer science courses — and doing it by hand is slow and error-prone past a few digits.

This converter translates numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) simultaneously: type in any field and the other three update live.

How to Use This Tool

  1. Type a number in any of the four fields — binary, octal, decimal, or hex.
  2. The other three bases update instantly.
  3. Copy whichever representation you need.
  4. Use prefixes mentally: 0b for binary, 0o for octal, 0x for hex when writing them in code.

Frequently Asked Questions

Why is hexadecimal so common in programming?

One hex digit represents exactly four bits, so a byte is always two hex digits. That makes hex a compact, lossless shorthand for binary: 0xFF is 11111111. Memory addresses, color codes, and hashes all use hex for this reason.

Where is octal still used?

Mainly Unix file permissions: chmod 755 means rwxr-xr-x, each octal digit encoding three permission bits for owner, group, and others. Octal also appears in some legacy protocols and escape sequences.

How does binary-to-decimal conversion actually work?

Each binary digit is a power of two, read right to left: 1011 is 1×8 + 0×4 + 1×2 + 1×1 = 11. Going the other way, you repeatedly divide by 2 and collect the remainders.

Copied!