Free number base converter

Binary to Decimal Converter — Hex, Octal & Text to Binary

Convert between binary, decimal, hexadecimal, octal and base 36 instantly, in both directions. See the working out step by step, flip individual bits, read two’s complement values, and convert text to binary and back.

  • All bases at once, live
  • Unlimited digits, no rounding
  • Runs offline in your browser
Input base

Prefixes like 0b, 0o and 0x are detected automatically. Negative values and separators such as spaces or underscores are allowed.

DecimalBase 10
181
BinaryBase 2
1011 0101
HexadecimalBase 16
B5
OctalBase 8
265
Base 32
5L
Base 36
51

Bit inspector

Click any bit to flip it. Place values are shown underneath.

Step-by-step working

    A binary converter that shows its working

    Most conversion pages hand you a number and nothing else. This one explains the arithmetic, lets you manipulate the bits directly, and handles values far larger than an ordinary calculator can hold.

    Every base at once

    Type once and read binary, octal, decimal, hexadecimal, base 32 and base 36 side by side. No dropdown gymnastics and no separate page for each direction.

    Shown step by step

    Repeated division for decimal to binary, positional expansion for binary to decimal. Ideal for homework, exams and anyone who has to reproduce the answer by hand.

    Clickable bit inspector

    Flip individual bits at 8, 16 or 32-bit width and watch every other representation update. Toggle signed mode to read two’s complement negatives correctly.

    No 64-bit ceiling

    Built on arbitrary-precision arithmetic, so a 200-digit number converts exactly. Ordinary converters silently round anything past 2 to the power of 53.

    Text to binary and back

    Proper UTF-8 encoding, so accents, emoji and non-Latin scripts round-trip correctly instead of turning into question marks.

    Bitwise calculator built in

    AND, OR, XOR, NOT and shifts with mixed-base inputs, masked to your chosen register width. No need to open a second tool.

    How to convert binary to decimal

    Four steps in the tool, plus the method behind them if you need to show your work.

    Pick the input base

    Choose Binary, Octal, Decimal or Hex. If you paste a prefixed value such as 0x1F, the base is detected for you.

    Type the value

    Enter the digits. Spaces and underscores are ignored, so 1011 0101 works exactly like 10110101. A leading minus sign is fine.

    Read every base at once

    All six conversions update live as you type. Use the copy button on any card to take just that result.

    Check the working

    Scroll to the step-by-step panel to see the division or expansion that produced the answer, then flip bits to test variations.

    Who needs a base converter

    Binary, hex and octal turn up far outside computer science classrooms.

    • Students

      Check homework answers and see the exact division steps a marker expects to find.

    • Embedded and firmware engineers

      Read register masks, flag bits and memory addresses without reaching for a calculator app.

    • Network engineers

      Translate subnet masks and IP octets between dotted decimal and binary in seconds.

    • Web developers

      Decode hex colour components, permission bits and character codes while debugging.

    • Security researchers

      Convert payload bytes between representations locally, without pasting them into a remote service.

    • Makers and hobbyists

      Set DIP switches, sensor registers and LED patterns by flipping bits visually instead of guessing.

    Binary to decimal to hex conversion chart (0 to 16)
    DecimalBinaryHexOctal
    0000000
    1000111
    2001022
    3001133
    4010044
    5010155
    6011066
    7011177
    81000810
    91001911
    101010A12
    111011B13
    121100C14
    131101D15
    141110E16
    151111F17
    16100001020
    Binary place values (powers of two)
    Bit positionPowerDecimal value
    Bit 02^01
    Bit 12^12
    Bit 22^24
    Bit 32^38
    Bit 42^416
    Bit 52^532
    Bit 62^664
    Bit 72^7128
    Bit 82^8256
    Bit 152^1532,768
    Bit 312^312,147,483,648

    How number base conversion actually works

    Every positional number system works the same way: each digit is multiplied by the base raised to the power of its position, counting from zero on the right. Decimal 245 is 2x10^2 + 4x10^1 + 5x10^0. Binary 1101 is 1x2^3 + 1x2^2 + 0x2^1 + 1x2^0, which is 13. Change the base and nothing else about the method changes.

    Converting binary to decimal

    Write the place value above each bit, doubling from right to left as 1, 2, 4, 8, 16 and so on, then add the values wherever the bit is 1. For 10110101 that is 128 + 32 + 16 + 4 + 1, which gives 181. The step-by-step panel above shows this expansion for whatever value you enter.

    Converting decimal to binary

    Divide by 2 repeatedly and write down each remainder. Reading the remainders from last to first gives the binary result. Decimal 181 produces remainders 1, 0, 1, 0, 1, 1, 0, 1, which read backwards is 10110101. The same repeated-division method works for any target base.

    Why hexadecimal exists

    One hex digit maps to exactly four binary digits, so a byte is always two hex characters. That makes hex a compact shorthand for binary that humans can actually read: 11111111 becomes FF. Octal does the same job in groups of three bits, which is why Unix file permissions are written as three octal digits.

    Two’s complement and negative numbers

    • The leftmost bit of a signed value is the sign bit: 0 for positive, 1 for negative.
    • To negate a number, invert every bit and add one.
    • An 8-bit signed value therefore covers minus 128 to 127, not 0 to 255.
    • Turn on signed mode in the bit inspector to see the same bit pattern read both ways.

    If you work with these values often, our subnet calculator handles the IPv4 side, the color converter covers hex colour codes, and the Roman numeral converter deals with the one common non-positional system.

    Binary converter FAQ

    Quick answers to the questions people ask about converting between bases.

    How do I convert binary to decimal?

    Multiply each binary digit by its place value, doubling from right to left as 1, 2, 4, 8 and 16, then add the results. For example 1011 is 8 + 0 + 2 + 1, which is 11. Paste the binary number into the converter above with Binary selected and the decimal value appears immediately, along with the full expansion.

    How do I convert decimal to binary by hand?

    Divide the number by 2 and note the remainder, then keep dividing the quotient by 2 until you reach zero. Read the remainders bottom to top and you have the binary equivalent. The step-by-step panel in the tool reproduces exactly this method so you can copy the working into an assignment.

    What is 10110101 in decimal?

    It is 181. The set bits sit at place values 128, 32, 16, 4 and 1, and those add up to 181. In hexadecimal the same value is B5 and in octal it is 265.

    Can this converter handle very large numbers?

    Yes. It uses arbitrary-precision integer arithmetic, so numbers with hundreds of digits convert exactly. Converters built on ordinary JavaScript numbers lose accuracy above roughly 9,007,199,254,740,991, which is where many competing tools quietly start returning wrong digits.

    How do I convert text to binary?

    Open the Text to binary tab, type or paste your text, and each character is encoded as UTF-8 bytes shown in 8-bit groups. Editing the binary side converts it straight back to text. Accented letters, emoji and non-Latin scripts are handled correctly because the tool encodes real UTF-8 rather than assuming one byte per character.

    What is two’s complement?

    It is the standard way computers store negative integers. The leftmost bit indicates the sign, and a negative value is formed by inverting every bit of the positive value and adding one. Switch on signed mode in the bit inspector to see how the same eight bits mean 181 unsigned but minus 75 signed.

    Why is hexadecimal used instead of binary?

    Because one hex digit represents exactly four bits, hex is a compact and error-resistant shorthand for binary. A 32-bit address needs 32 binary digits but only eight hex characters, and the grouping is unambiguous. Octal serves the same purpose in groups of three bits and survives mainly in Unix file permissions.

    Is my data sent anywhere?

    No. Every conversion runs in your browser with JavaScript. Nothing is transmitted or stored, so it is safe to convert keys, tokens and payload bytes. The page also keeps working if you go offline after it loads.

    Convert any base in one place

    Binary, octal, decimal, hex, base 32 and base 36, plus text encoding, bit flipping and bitwise maths. Free, exact at any size, and entirely private.

    Arbitrary-precision conversion, nothing is uploaded, stored or shared.

    Scroll to Top