Guide
Binary to octal: grouping bits in threes
Octal is base 8, and because 8 is two to the third power, a single octal digit covers exactly three bits. Before hexadecimal took over as the programmer’s shorthand, octal was the way to write machine words on computers whose word length was a multiple of three. Today you meet it mostly in Unix permissions, but the grouping trick is a standard exercise and a useful way to check your understanding of number bases.
The three-bit rule
Start at the binary point and cut the bit string into groups of three, moving outward. Where a group is short, pad it with zeros on the outer side. Then read each group as a number from 0 to 7: 000 is 0, 001 is 1, 010 is 2, 011 is 3, 100 is 4, 101 is 5, 110 is 6 and 111 is 7. The octal number is the digits in the same order as the groups.
Reading the working
Switch on “Show the working” and the page prints the padded bits, the groups, and the digit each one stands for, with the point kept in place. This makes the padding visible: a 9-bit input needs none, an 8-bit one gets one zero in front, and a 7-bit one gets two. The extra box under the result shows the same value as a decimal number, as hexadecimal and in base 36, so you can compare four representations of one quantity.
Options
Add the 0o prefix if you want the Python and modern JavaScript spelling of an octal literal. Leave it off for the plain digits that chmod takes. Grouping splits very long results into blocks. As with the other converters, several numbers can be pasted one per line, and a character that is not 0 or 1 is flagged with its position.
Edge cases
A leading zero group is not displayed: 000 111 gives 7, not 07. If you need the four-digit mode used by tools that accept a setuid or sticky bit, add the leading digit yourself. Negative numbers keep the minus sign and are not converted to a complement. Fractions are padded on the right, so binary 0.1 becomes 0.100 and the octal value is 0.4.
A worked example
The Sample button loads 11010110.101. Grouped from the point outward, the integer bits are padded to 011 010 110 and read as 3, 2 and 6. The fraction bits 101 are already three long and read as 5. The answer is 326.5. In decimal this is 214.625: 3 × 64 is 192, plus 2 × 8 is 16, plus 6, which is 214, and the fraction .5 in octal is 5/8, or 0.625. The same value in hexadecimal is D6.A.
Limits
The page converts numbers only. It will not turn permission bits into a symbolic string such as rwxr-xr-x, check that a mode is sensible, or apply it to anything; the chmod calculator is built for that. It also assumes the input is plain unsigned binary, so a bit pattern that was meant as a signed value must be interpreted with the two’s complement calculator first.
Related tools
- Octal to Binary expands each octal digit into three bits.
- Binary to Hex groups the same bits in fours instead.
- Octal to Decimal gives the numeric value of an octal number.
- Chmod Calculator turns permission checkboxes into octal and symbolic modes.
Checked against the current version of the Binary to Octal on .

