Number Base Converter

Convert numbers between binary, octal, decimal & hex.

Convert numbers between bases instantly

Every number you have ever written is really just a value expressed in base 10 — but computers, and the programmers who work with them, regularly need the same value in base 2, 8 or 16. This free number base converter takes a value in any of those bases and instantly shows the equivalent in all the others, updating live as you type. It is a small tool that saves a genuinely tedious manual calculation.

What a "base" actually means

A number base is simply how many unique digits a counting system uses before it carries over to a new column. Decimal uses ten digits (0–9) and carries over at ten. Binary uses only two digits (0 and 1) and carries over at two. Octal uses eight digits (0–7), and hexadecimal uses sixteen — the digits 0–9 followed by the letters A–F standing in for ten through fifteen. The value a digit represents depends on its position, exactly as the "1" in 100 means something different from the "1" in 1,000 — that positional idea is what a base system generalises.

Binary — the language of computers

Computers store and process everything as binary because the underlying hardware — transistors — reliably distinguishes only two states, on and off. Every number, character and instruction a computer handles is ultimately a sequence of these binary digits (bits). Long binary strings are hard for humans to read at a glance, which is precisely the problem hexadecimal and octal exist to solve.

Hexadecimal — a compact stand-in for binary

Because 16 is a power of 2 (24), a single hex digit always corresponds to exactly four binary digits, so a long, error-prone binary string becomes a short, readable hex string with no loss of information. That neat correspondence is why memory addresses, colour codes like #4f46e5, and byte values in debugging tools are almost always shown in hexadecimal rather than raw binary.

Octal — where it still shows up

Octal is less common today but still appears in specific corners of computing, most notably Unix and Linux file permission codes such as chmod 755. It exists for the same reason as hex: 8 is a power of 2 (23), so one octal digit cleanly represents three binary digits, making certain bit groupings easier to read than raw binary.

How to use the converter

Type a number into any one of the four fields — binary, octal, decimal or hexadecimal — and the other three update immediately with the equivalent value. Invalid input for a given base (like an "8" typed into the binary field) is flagged clearly, so you always know the conversion you are looking at is valid.

A worked example

Take the decimal number 202. Divided repeatedly by 2, the remainders read from bottom to top give the binary form 11001010. Grouping that binary string into sets of four from the right — 1100 and 1010 — converts directly to hex: 1100 is C and 1010 is A, giving 0xCA. Grouping the same binary into sets of three from the right for octal gives 312. All four — 202, 11001010, CA and 312 — represent exactly the same value; only the counting system describing it has changed. Seeing the mechanics once makes the shortcuts click, but for everyday work, letting the converter do it instantly is far faster than counting by hand.

Frequently asked questions

Which number bases does this tool support?

Binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16) — the four bases used most often in computing and mathematics.

Why do computers use binary internally?

Because the simplest reliable electronic switch has exactly two stable states — on and off — binary maps directly onto real hardware, whereas ten distinct voltage levels would be far less reliable to build.

Why is hexadecimal used so much if computers use binary?

Because each hex digit represents exactly four binary digits, hex gives a much shorter, human-readable stand-in for binary — which is why memory addresses and colour codes are almost always shown in hex.

Does it support negative numbers or decimals?

This converter focuses on non-negative whole numbers, which covers the vast majority of everyday conversions between bases; negative and fractional values need an extended notation beyond a simple base swap.