Binary to Octal Converter

This free online binary to octal converter instantly translates any binary (base-2) number into its octal (base-8) equivalent. Enter a binary value below to see the converted result right away.


How to Use the Binary to Octal Converter

  1. Type a binary number (only digits 0 and 1) into the "Binary Number" field.
  2. Click "Convert" to see the equivalent octal value.
  3. If you enter an invalid character, correct the input and convert again.

Converting by Groups of Three Bits

Octal is base 8, and 8 is 2 cubed, so one octal digit corresponds to exactly three bits. Working from the rightmost bit, cut the binary number into groups of three, add zeros to the left of the last group if it is short, and write each group as a single digit from 0 to 7.

Internally, the converter parses the input as a base-2 value and prints that value in base 8. The answer is identical to the grouping method, and the output never contains an 8 or a 9.

Worked Example: 11010111

Eight bits split from the right as 11 010 111. Padding the left group gives 011, 010 and 111, which are 3, 2 and 7. So 11010111 in binary is 327 in octal. Checking through decimal: binary 11010111 is 215, and octal 327 is 3 × 64 + 2 × 8 + 7 = 215.

Three-Bit Groups and Their Octal Digits

Bits000001010011100101110111
Octal01234567

Within a group the bits are worth 4, 2 and 1, so 101 is 4 + 1 = 5 and 110 is 4 + 2 = 6. Once that is familiar, most conversions can be done at a glance.

Where Octal Is Still Used: File Permissions

The best-known everyday use of octal is in Linux and Unix file permissions. Each file has three sets of read, write and execute flags, for the owner, the group and everyone else. Each set is three bits, so each becomes one octal digit for commands such as chmod.

PermissionsBinaryOctalTypical use
rwxr-xr-x111 101 101755Programs, scripts and directories
rw-r--r--110 100 100644Ordinary files such as web pages
rwx------111 000 000700Private folders only the owner can open

Enter 111101101 into the converter and it returns 755, the same digits you would type after chmod.

Things to Watch For

  • Leading zeros in the input do not appear in the output, so 000111 gives 7.
  • In several programming languages a number written with a leading 0 or the prefix 0o is read as octal. Add the prefix your language expects when you copy the result into code.
  • Results are exact for inputs of up to 53 bits. Longer bit strings should be converted in chunks whose length is a multiple of three.

Frequently Asked Questions

The tool parses your binary input as a base-2 number, then formats that value in base-8, using only the digits 0-7.

Binary 101010 equals decimal 42, which is 52 in octal. Try it yourself by entering 101010 above.

Each octal digit expands to three bits: 7 is 111, 5 is 101 and 5 is 101. Read as read, write and execute flags, that is rwx for the owner and r-x for the group and for others.

Hexadecimal is more common today because computers group bits into 8-bit bytes, and a byte is exactly two hex digits but does not split evenly into octal digits. Octal remains natural wherever data comes in sets of three bits, as with Unix permissions.

Replace every octal digit with its three-bit pattern and join them. Octal 327 becomes 011 010 111, or 11010111 after dropping the leading zero. The Number System Conversion tool can also do this for you.
No ratings yet — be the first!
Rate this calculator:
Was this tool helpful?