Skip to content

Number base converter (binary, octal, decimal, hex)

Convert numbers between binary, octal, decimal and hexadecimal. Enter the value and its base.

Decimal
255
Binary11111111
Octal377
HexadecimalFF

Use letters A–F for hexadecimal. Each digit must be valid in the chosen base.

How the calculation works

Each base uses its own set of digits: binary (0–1), octal (0–7), decimal (0–9) and hexadecimal (0–9 and A–F). The value is first converted to decimal and then rewritten in each base.

Example: FF in hexadecimal = 255 in decimal = 11111111 in binary.

Examples

  • 255 (decimal) = FF (hex) = 11111111 (binary).
  • 10 (decimal) = A (hex) = 1010 (binary) = 12 (octal).

Frequently asked questions

Why does hexadecimal use letters?

Base 16 needs 16 symbols. After 9, the letters A, B, C, D, E and F represent 10 through 15.

Why does computing use binary and hex?

Binary reflects hardware bits (on/off); hex is a compact way to write binary (each hex digit = 4 bits).

How to convert hex to decimal mentally?

Multiply each digit by the power of 16 for its position. E.g. 2F = 2×16 + 15 = 47.

Related calculators

More Tech / IT calculators

See all →

Updated on June 30, 2026 · by Rafael Rossi · Methodology & sources