Decimal · Base 10 → Base 8
Decimal to Octal Converter
Updated: June 2026
Converting decimal to octal follows the same repeated-division pattern as binary and hex, just with 8 as the divisor. It is the quickest way to turn a permission value or legacy constant back into the three-digit octal codes that Unix tools expect.
Free · No upload · Instant in the browser
The divide-by-8 method
Divide the number by 8 and record the remainder, which is always a digit from 0 to 7. Replace the number with the quotient and repeat until it reaches 0, then read the remainders bottom to top. Here is decimal 200:
200 ÷ 8 = 25 remainder 0
25 ÷ 8 = 3 remainder 1
3 ÷ 8 = 0 remainder 3
read upward → 310
So decimal 200 is octal 310. Verify it: 3×64 + 1×8 + 0 = 192 + 8 = 200.
The via-binary shortcut
Since one octal digit equals exactly three binary bits, you can convert to binary first and then group the bits in threes from the right. For 200 → binary 11001000 → grouped 011 001 000 → 3 1 0 → 310. This grouping trick is especially handy for permission bytes, where each octal digit corresponds neatly to one rwx triple.
Reference table
| Decimal | Octal | Decimal | Octal |
|---|---|---|---|
| 8 | 10 | 64 | 100 |
| 15 | 17 | 493 | 755 |
| 63 | 77 | 511 | 777 |
| 100 | 144 | 512 | 1000 |
Permission codes are the most common reason people convert to octal: 493 → 755 (rwxr-xr-x), 420 → 644 (rw-r--r--), and 511 → 777 (full access). The converter shows octal alongside binary so you can read the rwx bits directly.
Where you'll use it
- Producing
chmodandumaskvalues from a decimal permission total. - Writing octal literals in C, Python and shell scripts.
- Working with legacy file formats and protocols that store octal.
- Teaching base conversion where 3-bit grouping is the focus.
Frequently asked questions
How do you convert decimal to octal?
Divide by 8 repeatedly, record each remainder (0–7), and read the remainders bottom to top.
What is 64 in octal?
Decimal 64 is 100, because 64 = 8².
What is 493 in octal?
Decimal 493 is 755, the familiar chmod value.
Can octal have a digit 8?
No. Octal digits run from 0 to 7 only; the value 8 rolls over to 10.