Skip to content

Number bases, made clear

A short guide to binary, octal, decimal and hexadecimal — how they relate, how to convert, and how to use the converter.

Open the Number Base Converter →

What this tool does

The Number Base Converter converts a whole number between binary, octal, decimal, hexadecimal and any base from 2 to 36. Type in any field and the others update instantly. It uses arbitrary-precision arithmetic, so huge numbers stay exact, and it all runs in your browser.

What a "base" means

A base is how many distinct digits a system uses. Decimal (base 10) uses 0–9; binary (base 2) uses only 0 and 1; octal (base 8) uses 0–7; and hexadecimal (base 16) uses 0–9 then a–f for ten to fifteen. Each position is worth the base raised to its place, so binary 1011 is 8 + 0 + 2 + 1 = 11 in decimal.

Converting by hand

  • To a smaller base: divide repeatedly by the target base and read the remainders bottom-up.
  • From a base to decimal: multiply each digit by the base to the power of its position and add them up.
  • Binary ↔ hex: group bits in fours — each group is one hex digit — which is why hex is so handy.

How to use it

  1. Open the Base Converter.
  2. Type a value into decimal, binary, octal or hex.
  3. Watch the other fields update live; use the custom-base box for anything from 2 to 36.
  4. Click Copy on whichever representation you need.

Why hexadecimal is everywhere

Each hex digit is exactly four binary bits, so a byte is two tidy hex digits. That's why colours (#ff8800), memory addresses and byte dumps are written in hex — it's compact and lines up with the underlying binary.

Nothing is uploaded

All conversions happen locally in your browser — the numbers you enter are never sent anywhere.

FAQ

How do I convert decimal to binary?

Divide repeatedly by 2 and read the remainders bottom-up — or just type it in and read the binary field.

Why do programmers use hexadecimal?

Because each hex digit is four bits, so it maps cleanly onto binary and stays compact.

Is anything uploaded?

No — it all runs in your browser.

Ready to try it? Open the Number Base Converter →

Related guides