Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal.

Decimal
Binary
Octal
Hexadecimal
Bits

Non-negative whole numbers only. Enter digits valid for the chosen base (hex allows A–F).

Same number, different alphabets

A number’s value never changes — only how we write it. Each base uses a different set of digits and a different place value, so 255, 11111111 and FF all describe exactly the same quantity.

base 2 → 0,1 · base 8 → 0–7 · base 10 → 0–9 · base 16 → 0–9, A–F

The converter reads your value in its stated base, turns it into a plain number, and rewrites it in the others. Hexadecimal and binary are especially close — every hex digit is exactly four bits.

Worked example

The decimal number 255 is 11111111 in binary, 377 in octal and FF in hexadecimal — a single byte at its maximum value.

Why bases matter

Computers work in binary because circuits are naturally on or off. People find long binary strings hard to read, so hexadecimal provides a compact shorthand — common in colour codes, memory addresses and low-level programming. Octal turns up in older systems and file permissions.

Handy to know

  • One hex digit = four bits. Two hex digits make a byte (0–255).
  • Powers of two. Binary place values double: 1, 2, 4, 8, 16…
  • Colour codes. Web colours like #FF8800 are three hex bytes.

Frequently asked questions

What do the bases mean?
A base is how many digits a system uses. Decimal (base 10) uses 0–9; binary (base 2) uses 0 and 1; octal (base 8) uses 0–7; hexadecimal (base 16) uses 0–9 then A–F.
Why is hexadecimal used in computing?
It is a compact way to write binary. Each hex digit maps exactly to four binary bits, so a byte fits in two hex characters — far easier to read than eight ones and zeros.
What letters appear in hex?
A through F stand for the values 10 to 15. So FF is 15×16 + 15 = 255, and 1A is 1×16 + 10 = 26.
Does it handle decimals or negatives?
This converts non-negative whole numbers. Fractional and negative representations use additional conventions that vary by system.