Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    How to Convert Binary to Decimal (and Hex)

    Updated October 2026

    Written by the Toolpuffin team. Tools in this guide are tested in the browser.

    Binary uses only 0 and 1, decimal uses 0 to 9 and hexadecimal uses 0 to 9 and A to F. They are three ways to write the same number. This guide shows how to convert between them by hand, with examples you can check, and how a calculator does it in one step.

    The quick way

    1. Open the Number Base Converter.
    2. Type the number.
    3. Choose the base it is written in: binary, decimal or hexadecimal.
    4. Read the result in the other bases and copy the one you need.

    The rest of this guide explains what the tool does, so you can do it by hand or check an answer.

    Place values: how binary to decimal works

    In decimal every position is worth ten times the one to its right: 1, 10, 100, 1,000. In binary every position is worth two times the one to its right: 1, 2, 4, 8, 16, 32, 64, 128. A 1 means the position counts, a 0 means it does not.

    To convert binary to decimal, write the place values under the digits, then add up the ones. Take 11010110:

    Place value1286432168421
    Binary digit11010110
    Counts128640160420

    128 + 64 + 16 + 4 + 2 = 214. So 11010110 in binary is 214 in decimal.

    Decimal to binary

    Divide the number by 2 again and again, and write down the remainder each time. Stop when you reach 0, then read the remainders from bottom to top. For 45:

    • 45 divided by 2 is 22, remainder 1.
    • 22 divided by 2 is 11, remainder 0.
    • 11 divided by 2 is 5, remainder 1.
    • 5 divided by 2 is 2, remainder 1.
    • 2 divided by 2 is 1, remainder 0.
    • 1 divided by 2 is 0, remainder 1.

    Read upwards: 101101. Check it with place values: 32 + 8 + 4 + 1 = 45.

    Binary to hex: groups of four bits

    One hex digit stands for exactly four binary digits, so you can convert without any arithmetic. Split the binary number into groups of four, starting from the right, and replace each group with its hex digit.

    BinaryHexDecimalBinaryHexDecimal
    000000100088
    000111100199
    0010221010A10
    0011331011B11
    0100441100C12
    0101551101D13
    0110661110E14
    0111771111F15

    Example: 11010110 splits into 1101 and 0110. 1101 is D and 0110 is 6, so the hex value is D6. If the leftmost group has fewer than four digits, add zeros in front: 101101 becomes 0010 1101, which is 2D.

    To go from hex to binary, do the reverse: replace every hex digit with its four bits.

    Hex to decimal

    The place values in hex are powers of 16: 1, 16, 256, 4,096. Multiply each digit by its place value and add. Remember that A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15.

    • 2F: 2 × 16 + 15 = 47.
    • 1A3: 1 × 256 + 10 × 16 + 3 = 419.
    • D6: 13 × 16 + 6 = 214, the same number as the binary example above.

    Text to binary: ASCII and UTF-8

    A computer stores text as numbers. In ASCII, the letter H is 72 and the letter i is 105. Written as bytes of eight bits, that is 01001000 and 01101001, so the text Hi is 01001000 01101001 in binary, or 48 69 in hex.

    ASCII only covers English letters, digits and some symbols. Today the web uses UTF-8, which keeps the same codes for those characters and uses two to four bytes for everything else, such as accented letters and emoji. That is why one emoji gives several bytes.

    To turn text into binary or hex, or to turn bytes back into text, use the Text to Binary Converter. It works in both directions and shows binary, hex, decimal or octal.

    Common mistakes

    • Reading the digits from the wrong side. The rightmost digit is worth 1.
    • Forgetting that remainders are read from bottom to top when you divide by 2.
    • Leaving out leading zeros when you group bits into fours or bytes. 101 and 00000101 are the same number, but a byte has eight digits.
    • Mixing up the letter O and the digit 0 when typing hex.
    • Mistaking a number for text. The binary 00110001 is the number 49, and also the character 1 in ASCII. What it means depends on how it is used.

    Common questions

    How do I convert binary to text? Split the binary into bytes of eight digits, turn each byte into a number and look up the character. The Text to Binary Converter does this in the Code to text direction.

    How do I convert hex to decimal? Multiply each digit by its power of 16 and add, or choose hexadecimal in the Number Base Converter.

    How do I convert decimal to binary? Keep dividing by 2 and read the remainders upwards, or type the number in the converter with decimal selected.

    Can I use prefixes? Yes. 0b marks binary, 0x marks hex and 0o marks octal, so 0xD6 and 0b11010110 are both 214.

    Privacy

    Both converters work in your browser. Nothing you type is sent anywhere.

    More guides