Binary to Octal
Convert binary numbers to octal and octal numbers to binary.
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= 3100= 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
0band0oprefixes, underscores, and spaces between bit groups. - Optional prefix and digit grouping in the output.
- Fractions (
0.1binary =0.4octal) 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
How many bits is one octal digit?
Exactly three. That is why binary to octal conversion is done by splitting the bits into groups of three.
What is 111 111 111 in octal?
111111111 in binary is 777 in octal (511 in decimal) – the rwxrwxrwx permission mask.
What if the number of bits is not a multiple of three?
Leading zeros are implied. The converter pads the leftmost group automatically, so 1011 is read as 001 011 and becomes 13 in octal.