Convert octal to binary by expanding every octal digit into its 3-bit pattern. Unix file permissions such as 755 unfold into their rwx bits exactly this way.
Show calculation steps
Processed privately in your browser β nothing you paste is uploaded, logged or stored.
Expanding octal digits
Each octal digit unfolds into exactly three bits by table: 6β110, 5β101, 7β111. Concatenating the groups yields the binary β no arithmetic, no size limit, no rounding. This is the inverse of the 3-bit grouping and equally mechanical.
The operation matters most where octal is the native notation: permission masks, legacy dumps, and the occasional escape sequence in older languages.
Worked example
Input: 657 6 β 110 5 β 101 7 β 111 Result: 110 101 111 (= 110101111)
| Octal digit | 3-bit binary |
|---|---|
| 0 | 000 |
| 1 | 001 |
| 2 | 010 |
| 3 | 011 |
| 4 | 100 |
| 5 | 101 |
| 6 | 110 |
| 7 | 111 |
chmod, bit by bit
Expanding 755 gives 111 101 101 β read as rwx r-x r-x, the standard executable permission set. The expansion IS the meaning: each bit is one capability, and octal was chosen precisely so one digit describes one user class. The steps panel performs this unfolding for any mask you enter.
The leading-zero literal trap
In C and pre-modern JavaScript, an integer literal beginning with 0 was silently octal β 010 meant eight, a legendary source of bugs. Modern syntax demands the explicit 0o prefix, which this tool accepts and validates. If you maintain old code, this page is where 0777 stops being mysterious.
Guarantees and privacy
Exact at any length; digits 8 and 9 are rejected by name and position, catching decimal-pasted-as-octal instantly. Everything runs locally in your browser.
How to use the Octal to Binary Converter
- Enter the octal number – digits 0-7 only, 0o prefix optional.
- Click "Convert to binary".
- The steps expand every octal digit into its 3-bit group – for permissions, that is the rwx triple.
- Copy the binary result.
Frequently asked questions
How does each octal digit expand?
Straight lookup: 6 β 110, 5 β 101, 7 β 111. So 657 becomes 110 101 111 joined together. The expansion is exact and per-digit, which is why it never overflows.
How does this explain chmod 755?
7 = 111 = rwx, 5 = 101 = r-x. So 755 is rwxr-xr-x: owner everything, group and others read+execute. Every permission mask decodes this way, digit by digit.
What happens if I type an 8 or 9?
An error naming the digit and position – 8 and 9 simply do not exist in base 8. This catches the classic mistake of typing a decimal number into an octal field.
Do I keep or trim the leading zeros in the result?
Keep them when width matters (a 9-bit permission field), trim when only the value matters. The output preserves each digit's three bits; the value is unchanged either way.
Is the legacy of octal why numbers starting 0 misbehave in old code?
Yes – in C and older JavaScript, a leading zero marked an octal literal, so 010 meant 8. Modern style uses the explicit 0o prefix, which this tool accepts, precisely to avoid that trap.
Can I go octal β hex directly?
Via binary is exactly how it is done – and the Octal to Hex converter automates the two regroupings (3-bit out, 4-bit in) in one step.
Does the tool transmit my input?
No. Like every converter in this cluster, the work happens in your browser and nothing is logged or sent.