🔢

Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal instantly. Free, accurate, and runs entirely in your browser.

✓ Free forever✓ No signup✓ 100% private — runs in your browser
Number Base Converter
Convert numbers between Binary, Octal, Decimal, and Hexadecimal. Supports large numbers.
Input Number
Binary (Base 2)
—
Octal (Base 8)
—
Decimal (Base 10)
—
Hexadecimal (Base 16)
—
Bit Representation (32-bit)

The same number can be written in any base — base 10 is simply the one humans use by convention. Programming regularly requires the others: binary for bit manipulation and flags, hexadecimal for colours, memory addresses and byte values, octal for Unix file permissions.

How to use the Number Base Converter

  1. Type a number into the field for the base you are starting from
  2. The other bases update immediately
  3. Copy whichever representation you need

Where each base shows up

  • Binary (base 2) — bitmasks, permission flags, and anything where individual bits carry meaning.
  • Octal (base 8) — Unix file permissions. chmod 755 is octal: each digit is three permission bits, so 7 is rwx and 5 is r-x.
  • Decimal (base 10) — everything people read.
  • Hexadecimal (base 16) — colours (#7c6cff), memory addresses, byte values, and hashes. Popular because one hex digit maps to exactly four bits, so two digits are exactly one byte.

Converting by hand

Hex to binary is the easy direction, because each hex digit is exactly four binary digits. F is 1111, A is 1010, so FA is 11111010. No arithmetic required — just substitution.

To decimal, multiply each digit by its positional value. FA in hex is (15 × 16) + 10 = 250. From decimal, divide repeatedly by the target base and read the remainders backwards.

Worth memorising: hex FF is 255, the maximum value of one byte, which is why colour channels run 00–FF.

Frequently asked questions

Why is hexadecimal used so widely in programming?

Because one hex digit is exactly four bits, so two digits are exactly one byte. That makes the mapping between hex and binary direct and readable, which base 10 cannot offer.

What does chmod 755 mean?

It is octal. Each digit is three permission bits for owner, group and others: 7 is rwx (4+2+1), 5 is r-x (4+1). So the owner can read, write and execute; everyone else can read and execute.

Can it convert negative numbers?

It handles standard negative decimal input. Two's-complement representations — how negative numbers are actually stored in binary — depend on the word size and are not computed here.

What are the 0x and 0b prefixes?

Conventions marking the base in source code: 0x for hexadecimal, 0b for binary, and a leading 0 for octal in many languages. They are notation, not part of the number.