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.
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.
Prefixes like 0b, 0o and 0x are detected automatically. Negative values and separators such as spaces or underscores are allowed.
Click any bit to flip it. Place values are shown underneath.
Values accept any prefix: 0b binary, 0o octal, 0x hex, or plain decimal. Results are masked to the register width picked in the Bit inspector.
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.
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.
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.
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.
Built on arbitrary-precision arithmetic, so a 200-digit number converts exactly. Ordinary converters silently round anything past 2 to the power of 53.
Proper UTF-8 encoding, so accents, emoji and non-Latin scripts round-trip correctly instead of turning into question marks.
AND, OR, XOR, NOT and shifts with mixed-base inputs, masked to your chosen register width. No need to open a second tool.
Four steps in the tool, plus the method behind them if you need to show your work.
Choose Binary, Octal, Decimal or Hex. If you paste a prefixed value such as 0x1F, the base is detected for you.
Enter the digits. Spaces and underscores are ignored, so 1011 0101 works exactly like 10110101. A leading minus sign is fine.
All six conversions update live as you type. Use the copy button on any card to take just that result.
Scroll to the step-by-step panel to see the division or expansion that produced the answer, then flip bits to test variations.
Binary, hex and octal turn up far outside computer science classrooms.
Check homework answers and see the exact division steps a marker expects to find.
Read register masks, flag bits and memory addresses without reaching for a calculator app.
Translate subnet masks and IP octets between dotted decimal and binary in seconds.
Decode hex colour components, permission bits and character codes while debugging.
Convert payload bytes between representations locally, without pasting them into a remote service.
Set DIP switches, sensor registers and LED patterns by flipping bits visually instead of guessing.
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 8 | 10 |
| 9 | 1001 | 9 | 11 |
| 10 | 1010 | A | 12 |
| 11 | 1011 | B | 13 |
| 12 | 1100 | C | 14 |
| 13 | 1101 | D | 15 |
| 14 | 1110 | E | 16 |
| 15 | 1111 | F | 17 |
| 16 | 10000 | 10 | 20 |
| Bit position | Power | Decimal value |
|---|---|---|
| Bit 0 | 2^0 | 1 |
| Bit 1 | 2^1 | 2 |
| Bit 2 | 2^2 | 4 |
| Bit 3 | 2^3 | 8 |
| Bit 4 | 2^4 | 16 |
| Bit 5 | 2^5 | 32 |
| Bit 6 | 2^6 | 64 |
| Bit 7 | 2^7 | 128 |
| Bit 8 | 2^8 | 256 |
| Bit 15 | 2^15 | 32,768 |
| Bit 31 | 2^31 | 2,147,483,648 |
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.
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.
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.
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.
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.
Quick answers to the questions people ask about converting between bases.
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.
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.
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.
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.
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.
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.
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.
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.
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.