Number System Conversion Reference

Binary, octal, decimal, and hex equivalents side by side

Convert any number between decimal, binary, octal, and hexadecimal, with a full reference table of values 0 to 255 in all four bases. Fast, accurate, and fully private.

How does base conversion actually work?

Every number is the sum of its digits times powers of the base. To convert to another base you repeatedly divide by the new base and read the remainders in reverse. The reference table below shows this for 0 to 255.

Convert between every common number base

Computers store everything as binary, but programmers read and write numbers in several bases depending on context: decimal for everyday math, binary for bit-level work, octal in some file permissions and legacy systems, and hexadecimal for memory addresses, colors, and byte dumps. This tool converts a value between all four bases at once and includes a complete reference table for the first 256 values.

How it works

A number written in base b is a sum of each digit multiplied by a power of b. The decimal value 42 is 4 x 10 + 2 x 1. The same quantity in binary is 101010, which is 1x32 + 0x16 + 1x8 + 0x4 + 1x2 + 0x1. To convert a decimal value into another base, you repeatedly divide by the target base and collect the remainders, then read them in reverse order. The converter uses this exact positional-notation logic, validating that each input character is a legal digit for the base you selected (only 0 and 1 for binary, 0 to 7 for octal, 0 to 9 and A to F for hex).

Tips and examples

One hexadecimal digit maps to exactly four binary digits, so FF in hex is 11111111 in binary and 255 in decimal — the largest value in a single byte. Octal digits map to three bits each, which is why Unix file permissions like 755 are written in octal. Use the reference table below to spot these patterns: read across any row to see one byte expressed in all four bases. Everything runs locally in your browser, so you can convert sensitive values without sending them anywhere.