Octal and binary fit together like puzzle pieces, because 8 is a power of 2: every octal digit expands into exactly three bits, no rounding, no ambiguity. Paste any octal number into this tool and the binary expansion appears live as you type, with each digit keeping its own clean 3-bit slot. The conversion runs entirely inside your browser, so the number never travels anywhere, the page is free with no signup, and it works the same on a phone as on a desktop.
Take the octal number 17 as a warm-up. The digit 1 expands to the three bits 001, and the digit 7 expands to 111. Concatenating them gives 001111. Notice the leading zeros are kept: that is deliberate, because dropping them would blur which bits belong to which digit. The output length is always exactly three times the digit count, which makes the mapping visible and the reverse conversion trivial.
One everyday example motivates almost all real-world octal work: Unix file permissions. The familiar chmod value 755 expands to 111101101 in binary, and those nine bits read directly as the permission string rwxr-xr-x. If you have ever wondered what those digits actually mean at the bit level, this tool shows you in a single keystroke.
What Is Octal and Why Three Bits per Digit?
Octal is base 8, a number system with eight digits: 0, 1, 2, 3, 4, 5, 6, and 7. There is no digit 8 or 9, which trips up people seeing octal for the first time; if your input contains an 8 or a 9, this tool shows an error message pointing at the invalid digit rather than guessing. Each octal position carries a power of 8, so 17 in octal means 1 times 8 plus 7, which is 15 in decimal.
The clean relationship with binary comes from arithmetic: 8 equals 2 to the third power, so one octal digit encodes exactly three bits. Three bits can represent 000 through 111, which is 0 through 7, precisely the octal digit range. This is the same trick hexadecimal uses with 4 bits per digit, except octal groups are smaller.
History explains why octal stuck around at all. Early computers such as the PDP-8 and PDP-11 had word sizes of 12, 24, or 36 bits, all divisible by 3, so octal grouped their bits evenly. Unix inherited octal from that lineage and baked it into file permissions, where those nine permission bits divide perfectly into three groups of three. Modern hardware prefers 32- and 64-bit words, which is why hexadecimal dominates now, but octal survives wherever 3-bit groups are natural.
How to Use This Tool (Step by Step)
- Type or paste your octal number into the input box. Only digits 0 through 7 are accepted; anything else triggers a clear invalid-digit error.
- Watch the binary output update live on every keystroke. There is no convert button to press.
- Read the output as one continuous bit string, or mentally split it into groups of three to see each digit's contribution.
- Use the copy button to take the result into your notes, terminal, or homework.
- To go the other direction, paste the bits into the companion binary-to-octal tool; grouping in threes from the right restores the original digits.
Worked Examples You Can Check by Hand
Each row follows the same rule: look up each digit's 3-bit pattern and concatenate. These make good self-test exercises.
| Octal input | Digit-by-digit expansion | Binary output |
|---|---|---|
| 17 | 001 111 | 001111 |
| 7 | 111 | 111 |
| 755 | 111 101 101 | 111101101 |
| 644 | 110 100 100 | 110100100 |
| 1234 | 001 010 011 100 | 001010011100 |
| 0 | 000 | 000 |
A note on the first row: 17 in octal is 15 in decimal, and the minimal binary for 15 is 1111. The tool outputs 001111 because it preserves every digit's 3-bit slot, including the leading zeros. If you need the shortest form, strip leading zeros yourself; the numeric value is unchanged. Keeping the full width is usually more useful, because it makes the digit boundaries visible and the reverse conversion unambiguous.
The Permission Angle: Reading 755 as rwxr-xr-x
Unix permission digits are worth decoding in full because they combine octal, binary, and meaning in one place. Each digit describes one class of user: the first for the file's owner, the second for the group, and the third for everyone else. Each digit is a sum of three bit values: read counts 4, write counts 2, and execute counts 1.
So 755 means the owner digit 7 is 4 plus 2 plus 1, binary 111, which is read, write, and execute. The group digit 5 is 4 plus 1, binary 101, which is read and execute but not write. The final 5 repeats that for others. Concatenated, 111101101 lines up with the symbolic string rwxr-xr-x character for character. The value 644 expands to 110100100, which is rw-r--r--, the typical setting for a plain text file. Once you can see the nine bits, the whole chmod system stops being mysterious.
This mapping is also why permission digits never contain an 8 or 9: the maximum, 7, already uses all three bits. Any tool or tutorial showing a permission like 888 is simply wrong.
How the Conversion Works Internally
The algorithm is a fixed lookup, not a division procedure. Each octal digit maps to its 3-bit pattern: 0 to 000, 1 to 001, 2 to 010, 3 to 011, 4 to 100, 5 to 101, 6 to 110, and 7 to 111. The tool walks the input left to right, replaces every digit with its pattern, and concatenates the results. Input length does not matter, because each digit is handled independently; a 12-digit octal number produces a 36-bit string without any overflow concerns.
Validation happens before conversion. Characters outside 0 through 7, including spaces in unexpected places, letters, and the digits 8 and 9, produce an error message that names the offending character. Nothing is silently skipped, because a silently dropped digit would shift every bit that follows and produce a plausible-looking but wrong answer, which is the worst kind of bug.
Common Use Cases
- Debugging file permissions: expand a chmod value to bits to see exactly which of the nine flags are set, then compare against what the security policy expects.
- Teaching number bases: the digit-to-triplet mapping is the most visual way to demonstrate that bases linked by powers of two convert without arithmetic.
- Embedded and legacy work: some device registers and older protocols document fields in octal; expanding to bits shows the individual flags.
- Verifying umask math: subtracting a umask from 777 is easier to trust when you can see the bit patterns side by side.
- CTF challenges: beginner puzzles frequently hide permission-style octal strings, and quick bit expansion reveals the intended reading.
Tips and Best Practices
- Strip leading zeros only when you need the minimal binary form; keeping them preserves the visible 3-bit rhythm and makes errors easier to spot.
- Check your work by converting back: feed the binary output into binary-to-octal and confirm the original digits return.
- Remember that octal literals in C, JavaScript, and shell scripts often carry a leading zero, as in 0755. The zero is notation, not a digit; enter just 755 here unless you want an extra 000 group in the output.
- When comparing two permission values, convert both to binary and align them; bit-by-bit differences are obvious, while decimal differences are not.
- For very long octal strings, convert in sections if rendering feels slow; the per-digit mapping means sections can be concatenated safely at any 3-bit boundary.