CompSci.rocks

Number Base Converter

Convert any number between decimal, binary, hexadecimal, and octal instantly. Type a value into any field and the other three update automatically.

Type a value into any field below in decimal, binary, hexadecimal, or octal, and the other three update automatically. Useful for checking your work on byte values, color codes, memory addresses, or anything else that shows up in more than one base.

If you're still learning how to convert between bases by hand rather than just checking an answer, the number base conversion practice page walks through the method step by step and then quizzes you on it.

Why these four bases?

Decimal is what people use day to day. Binary is what the hardware actually stores — every value in memory is ultimately a sequence of 0s and 1s. Hex shows up constantly as shorthand for binary (colors, memory addresses, MAC addresses) because each hex digit maps to exactly 4 bits. Octal is less common today but still turns up in Unix file permissions and older systems, and maps just as cleanly to binary in groups of 3 bits.

Quick reference: 4-bit values

Since one hex digit always represents exactly 4 bits, memorizing this table makes converting between binary and hex a lookup instead of a calculation.

Decimal Binary Hex
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F

Want to build this skill instead of just checking an answer? The number base conversion practice page explains the manual conversion methods step by step and then generates random problems for you to work through.