Convert binary to octal and octal to binary. Step-by-step 3-bit grouping, Unix file permissions decoder, common chmod values, and complete reference table.
Octal (base 8) uses digits 0-7, with each digit mapping to exactly 3 binary bits. This makes binary-to-octal conversion as straightforward as grouping bits in threes — similar to how hexadecimal groups bits in fours. Octal's most prominent modern use is in Unix/Linux file permissions, where chmod commands like 755, 644, and 777 control read, write, and execute access.
This converter provides instant bidirectional conversion between binary and octal, along with step-by-step visualization showing how each 3-bit group maps to its octal digit. For Unix users, the built-in permissions decoder translates any 3-digit octal value into its symbolic permission string (rwxr-xr-x) and explains what each digit means for owner, group, and other users.
Whether you are a Linux system administrator setting file permissions, a CS student learning number bases, or a programmer working with legacy systems that use octal notation, this tool handles conversion instantly while teaching the underlying mapping. The common permissions reference table covers the most frequently used chmod values with explanations.
The octal-binary mapping (3 bits per digit) is simpler than hex, but the real value of this tool is the Unix permissions integration. Enter a chmod value like 755 and instantly see the binary breakdown, symbolic notation, and what each permission level means — no need to memorize the permission table.
Binary to Octal: Group binary digits in groups of 3 from right, convert each group (000=0, 111=7). Octal to Binary: Replace each octal digit with its 3-bit binary equivalent. Unix: Each octal digit = r(4) + w(2) + x(1). E.g., 7 = rwx, 5 = r-x, 4 = r--
Result: 111 101 101 (binary) = rwxr-xr-x
755 in octal: 7=111 (rwx for owner), 5=101 (r-x for group), 5=101 (r-x for others). This is the standard permission for executable files and directories in Unix/Linux.
Octal was widely used in early computing when word sizes were multiples of 3 (6-bit, 12-bit, 36-bit). The PDP-8, one of the most popular minicomputers, used 12-bit words displayed as 4 octal digits. When 8-bit bytes and 16/32-bit words became standard, hexadecimal (which groups 4 bits) became more practical, but octal persists in Unix permissions.
Unix file permissions use 9 bits: 3 for owner, 3 for group, 3 for others. Each group has read (r=4), write (w=2), and execute (x=1) bits. The octal representation compresses each 3-bit group into a single digit. Special bits (setuid, setgid, sticky) use a fourth leading digit.
Incorrect permissions are a common security vulnerability. SSH private keys must be 600 or 400. Web-accessible directories should never be 777. The principle of least privilege says: grant the minimum permissions needed. Use `chmod -R` carefully — recursive permission changes can expose sensitive files.
Group binary digits in groups of 3 from right to left, padding with zeros if needed. Convert each group: 000=0, 001=1, 010=2, 011=3, 100=4, 101=5, 110=6, 111=7.
755 means owner has full access (7=rwx), group has read and execute (5=r-x), and others have read and execute (5=r-x). This is standard for web server directories and executable scripts.
Each permission set (read, write, execute) is 3 bits, and each octal digit represents exactly 3 bits. This makes octal a natural fit: one digit per permission group (owner, group, other).
644 (rw-r--r--) is for regular files: owner can read/write, everyone else read-only. 755 (rwxr-xr-x) adds execute permission, needed for directories (to enter them) and scripts (to run them).
Octal was more common historically in PDP-8 and other systems. Today it is used in Unix permissions, C/C++ octal literals, some assembly languages, and aviation transponder codes (squawk codes like 7700).
777 (rwxrwxrwx) gives everyone full read, write, and execute access — generally a security risk. It is sometimes used temporarily for debugging but should never be left on production files.