Loading...
Loading...
Enter binary numbers and see their octal equivalents instantly. Useful for Unix permissions, embedded systems, and any context where base-8 notation appears.
Binary code (0s and 1s)
Octal (base-8)
Octal is base-8, meaning it uses only the digits 0 through 7. Like hex, it exists primarily as a shorthand for binary. Where hex groups bits in fours, octal groups them in threes. This works because 2³ = 8, so every possible 3-bit combination maps to exactly one octal digit.
To convert by hand, split the binary string into groups of 3 bits starting from the right, padding the leftmost group with leading zeros if it has fewer than 3 bits. Then replace each group with its octal digit. For example, 110 111 010 converts to 6, 7, 2, giving 672 in octal. The tool above handles the grouping and padding automatically.
Octal was widely used in computing before hex became dominant. Many older minicomputers and some early Unix systems stored data in 12-bit, 24-bit, or 36-bit words, which divide evenly into groups of three. This made octal a natural fit for those architectures. Today you encounter it most often in Unix file permission notation.
The most common reason to work with octal today is Unix file permissions. Every file and directory in a Unix or Linux system has three sets of permission bits: owner, group, and others. Each set has three bits: read (r), write (w), and execute (x).
Because each set is exactly 3 bits, it maps to one octal digit. The chmod command uses this. When you write chmod 755, the 7 means rwx (binary 111), the first 5 means r-x (binary 101), and the second 5 means r-x (binary 101). The full permission string 111 101 101 in binary is 755 in octal.
If you have a binary permission string from a system call trace or a debugging session and need to express it as a chmod value, paste it here to get the octal equivalent immediately.
Enter one binary number per line. The converter groups your bits into triplets from the right, pads as needed, and outputs the octal value. Leading zeros in the input are stripped before conversion unless they are part of a group of three, so the result is always the minimal representation.
Multiple values convert in batch. Results update in real time, and you can copy any individual result or the full output list.
Why does octal group bits in threes but hex groups in fours?
Both grouping sizes work because 8 (2³) and 16 (2⁴) are exact powers of two. Octal needs 3 bits per digit; hex needs 4. Hex is more common today because 8-bit bytes divide evenly into two hex digits, whereas an 8-bit byte takes 2.67 octal digits, which is awkward.
What is the octal representation of the binary number 11111111?
Split into groups of three from the right: 11 and 111 and 111. Pad the left group: 011 111 111. Each group is 3, 7, 7, so the octal result is 377. This is also 255 in decimal and 0xFF in hex.
Does the tool accept the 0b prefix?
Yes. The 0b prefix used in many programming languages to denote binary literals is stripped automatically before conversion. You can paste values directly from source code without editing them.