Binary to Octal

Convert binary numbers to octal and octal numbers to binary.

0 chars
0 words
0 lines
0 chars
0 words
0 lines

Binary to Octal Converter

This tool converts binary numbers to octal and octal numbers back to binary, one number per line. 111101101 becomes 755, 1000 becomes 10, and 11111111 becomes 377. It is useful for file permissions, older computer architectures, and computer science homework.

The three-bit rule

Eight is two to the third power, so every octal digit maps to exactly three binary digits. To convert binary to octal, split the bits into groups of three from the right, pad the leftmost group with zeros if necessary, and replace each group with a digit from 0 to 7:

  • 000 = 0, 001 = 1, 010 = 2, 011 = 3
  • 100 = 4, 101 = 5, 110 = 6, 111 = 7

Example: 1 101 011 → pad to 001 101 011 → 1 5 3 → 153. Going the other way, write each octal digit as three bits: 644 → 110 100 100.

Unix permissions in binary and octal

Linux file permissions are the classic real-world case. The nine permission bits rwxr-xr-x are 111 101 101 in binary, which is 755 in octal. rw-r--r-- is 110 100 100, i.e. 644. Converting between the two forms helps you understand exactly which bits chmod sets and debug umask values such as 022.

Features

  • Bulk conversion: paste many numbers, one per line, and keep empty lines in place.
  • Accepts 0b and 0o prefixes, underscores, and spaces between bit groups.
  • Optional prefix and digit grouping in the output.
  • Fractions (0.1 binary = 0.4 octal) and negative numbers are supported.
  • Arbitrary-length inputs thanks to exact big-integer arithmetic.

To see the same value in decimal and hex, use the All Number Converter, or convert octal to hex directly with Octal to Hex.

Frequently Asked Questions

Exactly three. That is why binary to octal conversion is done by splitting the bits into groups of three.

111111111 in binary is 777 in octal (511 in decimal) – the rwxrwxrwx permission mask.

Leading zeros are implied. The converter pads the leftmost group automatically, so 1011 is read as 001 011 and becomes 13 in octal.