=Calculate
Math & numbers · Bases

Binary / hex
converter

Type a number in any base — decimal, binary, hex or octal — and see it in all four at once. The everyday translator for programming, networking and computer-science homework.

4 bases, liveBit length shownNo sign-up
Base translatoredit any field
Bits neededbinary digit count

Same number, different alphabets

Every base is just a place-value system with a different column size. Decimal columns are powers of 10; binary's are powers of 2; hex packs four binary digits into one symbol (0–F), which is exactly why programmers love it — it's binary at a readable density.

202 in four bases
decimal 202 = binary 11001010 = hex CA = octal 312
(11001010 → 1100|1010 → C|A)

Reading binary and hex

Binary 11001010 is 128+64+8+2 = 202. For hex, split the binary into groups of four from the right and translate each: 1100 = C, 1010 = A. Going the other way is the same trick reversed — no long division needed.

Where each shows up

Hex dominates in colors (#CA5A2B), memory addresses, MAC addresses and hashes. Binary underlies bitmasks and permissions; octal survives in Unix file modes (chmod 755). This converter handles arbitrarily large integers, so hashes and long addresses translate fine. For ordinary arithmetic, the scientific calculator is one door over.

Common questions

Binary / hex FAQ

Add the powers of two where a 1 appears. 11001010 = 128+64+8+2 = 202.

Group the binary digits in fours from the right and translate each group: 1100 1010 → C A → 0xCA. Every hex digit is exactly four bits.

It's compact binary: one hex digit per four bits, so a byte is exactly two hex digits. Colors, memory addresses and hashes all read far better in hex than in raw binary.

Arbitrary-precision integers — paste values far beyond 64-bit and the conversion stays exact.