Toolbit

Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal in real time.

What is a positional numeral system?

Every numeral system this calculator handles (binary, octal, decimal, and hexadecimal) is positional: the value of each digit depends on the position it occupies, multiplied by a power of the system's "base." In decimal (base 10), the number 243 is worth 2×10² + 4×10¹ + 3×10⁰. The only difference between bases is how many distinct symbols are available for each position: base 2 only has 0 and 1, base 8 has 0-7, base 10 has 0-9, and base 16 adds the letters a-f to represent values 10 through 15 in a single digit.

No base is "more true" than another — they all represent the same quantity, only the notation changes. Picking one base over another is purely a matter of convenience for the context.

Why each base is used where it's used

Binary is the native language of hardware: a transistor is either on or off, no in-between, so two symbols (0 and 1) are exactly enough. Everything else — from an integer in memory to a network packet — is binary underneath. The catch is that reading or writing binary by hand is tedious: a single byte is already 8 characters.

Hexadecimal exists as a compact, human-friendly way to write binary: each hex digit represents exactly 4 bits (a "nibble"), so a full byte fits in just 2 characters (0x00 to 0xff). That's why it shows up in memory addresses, web colors (#2dd4a7), MAC addresses, cryptographic hashes, and hex dumps — it's the most readable way to display binary without losing the exact bit-for-bit correspondence.

Octal plays the same role as hexadecimal but groups bits by 3 instead of 4. It's far less common today, but it's still alive in Unix/Linux file permissions (chmod 755), where each octal digit represents the read/write/execute permissions for one group (owner, group, others) in exactly 3 bits.

Decimal is the base humans use for everything else, almost certainly because we have 10 fingers — it has no particular technical advantage for computing, it's simply the one that feels natural to us for reading quantities.

How conversion between bases works

Converting from any base to decimal means summing each digit multiplied by the base raised to the position it occupies (starting at 0 from the right). For example, binary 1011:

1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11

Converting from decimal to another base is the reverse process: repeatedly divide by the base and keep the remainders, bottom to top. To convert 11 to binary: 11÷2=5 remainder 1, 5÷2=2 remainder 1, 2÷2=1 remainder 0, 1÷2=0 remainder 1 — reading the remainders bottom to top: 1011.

Converting directly between binary, octal, and hexadecimal (without going through decimal) is faster: since 8 = 2³ and 16 = 2⁴, you can just group the bits by 3 (for octal) or by 4 (for hexadecimal) and convert each group separately. That's why this calculator displays binary grouped into 4-bit nibbles — it lets you see the direct correspondence with each hex digit at a glance.

How to use this calculator

Type a value into any of the four fields — binary, octal, decimal, or hexadecimal — and the other three update instantly. Each field validates that you're using the correct symbols for that base (for example, an 8 isn't valid in octal, and a g isn't valid in hexadecimal), with a message telling you exactly which character and position failed. The result is also reflected in the URL so you can share or bookmark a specific conversion.