Number Base Converter

Convert via decimal intermediate

How Number Base Conversion Works

Number bases (radixes) define how many unique digits are used before place values roll over. Our everyday decimal system uses base 10 with digits 0–9. Binary (base 2) uses only 0 and 1 — the language of computers. Octal (base 8) uses digits 0–7. Hexadecimal (base 16) uses 0–9 and A–F (representing 10–15). Each position in a number represents a power of the base, just as in decimal where 253 means 2×10² + 5×10¹ + 3×10⁰.

Converting from any base to decimal is the foundation of all other conversions. Multiply each digit by the base raised to its position power (starting from 0 on the right) and sum the results. Binary 1010₂ = 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 8 + 0 + 2 + 0 = 10₁₀. Hexadecimal FF₁₆ = 15×16¹ + 15×16⁰ = 240 + 15 = 255₁₀. Once you have the decimal value, converting to any other base uses repeated division.

To convert decimal to another base, divide repeatedly by the target base and collect remainders from bottom to top. Decimal 255 to binary: 255 ÷ 2 = 127 r 1, 127 ÷ 2 = 63 r 1, 63 ÷ 2 = 31 r 1, 31 ÷ 2 = 15 r 1, 15 ÷ 2 = 7 r 1, 7 ÷ 2 = 3 r 1, 3 ÷ 2 = 1 r 1, 1 ÷ 2 = 0 r 1. Reading remainders upward: 11111111₂. The same process works for octal and hexadecimal.

Hexadecimal is especially important in computing because each hex digit represents exactly four binary digits (a nibble). The byte value 255 is FF in hex and 11111111 in binary — much more compact to read and write. Color codes in web design (#FF5733), memory addresses (0x7FFF), and MAC addresses all use hexadecimal notation. Octal was historically common in Unix file permissions (chmod 755) though hex and binary are more prevalent today.

Binary powers appear throughout computing: 2¹⁰ = 1,024 (often called a kilobyte in computing), 2²⁰ = 1,048,576 (megabyte), 2³⁰ ≈ 1 billion (gigabyte). Understanding base conversion is essential for bitwise operations, subnet masking in networking, ASCII/Unicode character codes, and debugging low-level software. Select your source and target bases, enter a number, and the converter handles the arithmetic instantly.

Examples

ExampleResult
255 decimal → hexFF
10 decimal → binary1010
64 decimal → octal100
42 decimal → hex2A
15 decimal → binary1111
100 decimal → binary1100100
FF hex → decimal255

Frequently asked questions

FF. In hex, F = 15, so FF = 15×16 + 15 = 255. It is also 11111111 in binary.

Each hex digit represents exactly 4 binary digits, making long binary strings compact and easier to read. Memory addresses and color codes commonly use hex.

Multiply each digit by 2 raised to its position power (from right, starting at 0) and sum. Example: 1010 = 8 + 2 = 10.

Related calculators