🔢 Number Base Converter: Binary, Octal, Decimal & Hexadecimal

Type a number and its base, then choose the base to convert to.

No ratings yet — be the first

Enter details

You can also type 0x, 0b or 0o in front.
2 = binary, 8 = octal, 10 = decimal, 16 = hex.

Log in or create a free account to save your inputs and results, so you don't have to enter them again next time.🔒 No spam, ever. We never sell or share your details, and you can delete your history or account at any time. Privacy policy

Fill in the details and click Calculate to see your results.

Formula at a glance

Base Converter: Place value — Value = Σ digit × base^position. Example: 255 in hexadecimal → In base 16: FF
How the Base Converter works: Place value — Value = Σ digit × base^position

Rate this calculator

Was it useful? A quick star rating helps others — and you can leave a comment too.
Rate it: ★ ★ ★ ★ ★

📘 About the Base Converter

In base 10 each place is worth ten times the one to its right. Computers work in base 2 (binary), where each place is worth twice the one to its right, so 1011 in binary is 8 + 0 + 2 + 1 = 11. Hexadecimal (base 16) uses the digits 0–9 and A–F and is a compact way to write binary: each hex digit is exactly four binary digits.

Programmers use hex for colours (#FF8800), memory addresses and byte values, and octal for Unix file permissions (chmod 755).

🧮 Formula

Place value
Value = Σ digit × base^position

✏️ Worked examples

255 in hexadecimal

You enter
Number255
From base10
To base16
You get
In base 16FF
Binary (base 2)1111 1111
Octal (base 8)377
Decimal (base 10)255
Hexadecimal (base 16)FF
Bits needed8

255 is FF.

Binary 101101 in decimal

You enter
Number101101
From base2
To base10
You get
In base 1045
Binary (base 2)10 1101
Octal (base 8)55
Decimal (base 10)45
Hexadecimal (base 16)2D
Bits needed6

101101₂ is 45.

🧭 How to use this calculator

What you enter

  • NumberYou can also type 0x, 0b or 0o in front.
  • From base2 = binary, 8 = octal, 10 = decimal, 16 = hex.
  • To base

What you get

  • In base 2
  • Binary (base 2)
  • Octal (base 8)
  • Decimal (base 10)
  • Hexadecimal (base 16)
  • Bits needed

❓ Frequently asked questions

How do I convert decimal to binary?

Divide by 2 repeatedly and write the remainders from last to first. 13 → 1101.

What is FF in decimal?

255.