๐ข Octal to Binary Converter
By Shihab Mia ยท Updated 2026-07-27
Binary result
1101101 Decimal (base 10)
109
3 octal digits -> 7 binary digits
This octal to binary converter turns any base-8 number into its exact base-2 (binary) equivalent, and shows the decimal value in between so you can check the working. Type digits 0 to 7, and the binary and decimal results update instantly using exact integer math (via BigInt), so even very long octal numbers convert without any rounding or precision loss. Copy the binary result in one click.
What is the Octal to Binary Converter?
Octal is a base-8 number system that uses only the digits 0 through 7, while binary is a base-2 system that uses only 0 and 1. Both are used in computing because they map cleanly onto binary hardware: octal was historically popular for representing binary data (each octal digit stands for exactly 3 binary bits) before hexadecimal became the more common shorthand. You will still see octal today in Unix and Linux file permissions (for example, chmod 755), in some older assembly and C-style literals written with a leading zero, and in a handful of legacy protocols and embedded systems.
There are two equally valid ways to convert octal to binary, and this tool effectively uses the more rigorous one. The fast "shortcut" method converts each octal digit independently into a fixed 3-bit binary group, since 8 is 2 cubed: 0 becomes 000, 1 becomes 001, up to 7 becomes 111. Concatenating those groups (and trimming any leading zeros from the very first group) gives the final binary number directly, with no carrying or borrowing needed. The other method, which is what actually runs under the hood here, converts the octal number to a decimal (base-10) integer first using positional place values, then converts that decimal integer to binary through repeated division by 2. Both methods always agree, because they describe the same number in two different bases; the 3-bit shortcut is just a mental shortcut for the same arithmetic.
The reason this matters in practice is precision. Standard JavaScript numbers are IEEE-754 doubles, which only represent integers exactly up to 2^53 (about 9 quadrillion). A sufficiently long octal number, such as a 20-digit value, converts to a decimal number far larger than that limit, and a naive parseInt-based converter would silently round the result and return a wrong answer with no warning. This tool avoids that trap entirely by doing the digit-by-digit conversion with JavaScript BigInt, an arbitrary-precision integer type, so the decimal and binary outputs stay exact no matter how long the octal input is.
One honest limitation: this tool converts whole (unsigned) integers only. It does not interpret octal fractions (digits after a point), and it does not apply two's-complement encoding for negative or signed binary representations, since octal literals in most contexts (file permissions, unsigned literals) are unsigned to begin with. If you need signed binary representation of a negative value, you will need a tool built specifically for that.
When to use it
- Decoding Unix or Linux file permission modes (e.g. chmod 755, 644, 600) into their raw binary read/write/execute bits.
- Converting an octal literal from older C, C++, or assembly source code (numbers written with a leading zero) into binary for a debugger or spec sheet.
- Completing computer science or digital logic coursework that asks for base conversions between octal and binary.
- Checking a manual octal-to-binary conversion (the 3-bits-per-digit shortcut) against an exact, independently computed answer.
- Working with legacy embedded systems, printer control codes, or older networking protocols that still document values in octal.
- Converting very long octal strings where a calculator that uses ordinary floating-point numbers would round the answer.
How to use the Octal to Binary Converter
- Type an octal number into the input box, using only the digits 0 to 7.
- The binary result, the decimal (base 10) value, and the digit count update automatically as you type.
- If you type an invalid character (an 8, a 9, a letter, or a symbol), a message explains exactly what to fix.
- Use the Copy button next to the binary result to copy it straight to your clipboard.
- Clear the box and type a new octal number to convert a different value at any time.
Formula & method
Worked examples
Convert the octal number 155 to binary (the default example above).
- Confirm every character is a valid octal digit (1, 5, 5 are all 0 to 7).
- Place-value method: 1 x 8^2 + 5 x 8^1 + 5 x 8^0 = 64 + 40 + 5 = 109 in decimal.
- Digit-grouping check: 1 = 001, 5 = 101, 5 = 101, concatenated is 001101101.
- Drop the leading zeros from the first group: 1101101.
- Both methods agree: octal 155 = decimal 109 = binary 1101101.
Result: Octal 155 = decimal 109 = binary 1101101
Convert the Unix file permission octal 755 (common for chmod) to binary.
- Digit-grouping method: 7 = 111, 5 = 101, 5 = 101.
- Concatenate the three 3-bit groups in order: 111 101 101, which is 111101101.
- Cross-check with the place-value method: 7 x 64 + 5 x 8 + 5 x 1 = 448 + 40 + 5 = 493 in decimal.
- Convert 493 to binary by repeated division by 2 (or trust the grouping above): 111101101.
- Both methods agree: octal 755 = decimal 493 = binary 111101101, which reads as three permission triples (rwx, r-x, r-x once mapped to permission bits).
Result: Octal 755 = decimal 493 = binary 111101101
Octal digit to 3-bit binary map (the shortcut method)
| Octal digit | Binary (3 bits) | Decimal value |
|---|---|---|
| 0 | 000 | 0 |
| 1 | 001 | 1 |
| 2 | 010 | 2 |
| 3 | 011 | 3 |
| 4 | 100 | 4 |
| 5 | 101 | 5 |
| 6 | 110 | 6 |
| 7 | 111 | 7 |
Common octal values converted to decimal and binary
| Octal | Decimal | Binary |
|---|---|---|
| 7 | 7 | 111 |
| 10 | 8 | 1000 |
| 17 | 15 | 1111 |
| 100 | 64 | 1000000 |
| 644 | 420 | 110100100 |
| 755 | 493 | 111101101 |
| 777 | 511 | 111111111 |
Common mistakes to avoid
- Treating octal digits as decimal digits. Octal 20 is not decimal 20. Octal 20 means 2 x 8 + 0 = decimal 16. Always apply the base-8 place values (1, 8, 64, 512, ...) rather than reading the digits as if they were base 10.
- Allowing 8 or 9 in an octal number. Octal only uses digits 0 to 7. If your source number contains an 8 or a 9, it is either a decimal number, a typo, or from a different base entirely, and it is not valid octal input.
- Forgetting to pad binary groups to 3 bits internally. When using the digit-grouping shortcut by hand, each octal digit must expand to exactly 3 binary bits (with leading zeros inside the group, such as 1 becoming 001, not just 1). Only the very first group of the final answer has its leading zeros dropped.
- Losing precision on long numbers with ordinary calculator apps. Many calculators and simple scripts convert through standard floating-point numbers, which are only exact up to 2^53. A long octal string can exceed that silently and return a rounded, wrong answer. This tool uses BigInt arithmetic specifically to avoid that failure.
Glossary
- Octal
- A base-8 number system using only the digits 0 through 7, where each place value is a power of 8.
- Binary
- A base-2 number system using only the digits 0 and 1, the native representation used by digital computer hardware.
- Place value
- The weight of a digit based on its position in a number, equal to the base raised to that position (counting from 0 on the right).
- BigInt
- A JavaScript numeric type that represents integers of arbitrary size exactly, avoiding the precision limits of ordinary floating-point numbers.
- Bit
- A single binary digit, either 0 or 1, the smallest unit of data in binary and digital systems.
- chmod permission mode
- A Unix or Linux file permission expressed as an octal number (e.g. 755), where each digit encodes read, write and execute bits for owner, group and others.
Frequently asked questions
How do I convert octal to binary by hand?
The fastest way is to convert each octal digit on its own into a fixed 3-bit binary group (0=000 up to 7=111), then join the groups together and drop any leading zeros from the very first group. For example, octal 17 becomes 001 111, which trims to 1111.
Why does each octal digit turn into exactly 3 binary bits?
Because 8 equals 2 cubed. Three binary bits can represent exactly 8 distinct values (000 through 111), which is exactly the range of a single octal digit (0 through 7), so the mapping is always one-to-one with no overlap or gaps.
What is octal 755 in binary, and why does it matter for file permissions?
Octal 755 is binary 111101101. Split into its three original 3-bit groups, that is 111 (owner: read, write, execute), 101 (group: read, execute), and 101 (others: read, execute), which is exactly what the Unix permission mode 755 grants.
Does this converter handle very long octal numbers accurately?
Yes. The conversion runs on JavaScript BigInt, an arbitrary-precision integer type, instead of ordinary floating-point numbers. Ordinary numbers only stay exact up to 2^53, so a long octal input could otherwise round to a slightly wrong result without any warning; BigInt avoids that entirely.
Can this tool convert negative octal numbers or two's-complement binary?
No. It converts unsigned whole octal integers only, which matches how octal is used in practice (file permissions, unsigned literals). It does not apply a sign bit or two's-complement encoding, since that requires knowing a fixed bit width that varies by use case.
Is my data sent to a server when I use this converter?
No. All conversion happens locally in your browser using JavaScript. Nothing you type is transmitted anywhere, which makes the tool safe to use for internal file permission values or any other private figures.