Online Calculators and Tools | Calculators Toolbox
Our free octal converter switches numbers between decimal (base 10) and octal (base 8) in both directions, with the full working shown. Each result also includes the binary and hexadecimal values, which is perfect for programming and Unix file permissions.
Octal is a base-8 number system that uses only the digits 0 through 7. After 7 comes 10 (which means eight), then 11 (nine), and so on. Each place is worth eight times the place to its right: ones, eights, sixty-fours, 512s and 4,096s.
Octal was popular in early computing because many machines used word sizes that were multiples of three bits, and each octal digit represents exactly three binary digits. Hexadecimal has since become more common, but octal is still essential in one very visible place: Unix and Linux file permissions, where commands like chmod 755 use octal digits.
To convert decimal to octal, divide by 8 repeatedly and collect the remainders. To convert octal to decimal, multiply each digit by its power of 8 and add.
For 493: 493 ÷ 8 = 61 r 5, 61 ÷ 8 = 7 r 5, 7 ÷ 8 = 0 r 7. Reading upward gives 755. Going back, 7 × 64 + 5 × 8 + 5 × 1 = 448 + 40 + 5 = 493.
chmod 755 gives the owner read, write and execute (7), and everyone else read and execute (5).
Python writes octal as 0o755, while C and older JavaScript treat a leading 0 as octal, a common source of bugs.
Aircraft squawk codes like 7700 (emergency) use octal digits, so codes never contain an 8 or 9.
Machines like the PDP-8 and early IBM systems used 12-, 24- or 36-bit words, which split neatly into octal digits.
Many languages allow octal escape codes in strings, such as \101 for the letter A.
Octal is a common stepping stone in teaching how different bases work.
Each octal digit adds up read (4), write (2) and execute (1). So 7 = 4 + 2 + 1 (all three), 6 = 4 + 2 (read and write), 5 = 4 + 1 (read and execute) and 4 = read only.
A three-digit permission like 644 sets the owner (6 = read/write), the group (4 = read) and everyone else (4 = read). It's the standard setting for ordinary files on web servers.
755 for folders and scripts, 644 for regular files, 600 for private files like SSH keys, and 777 (everyone can do everything), which should be avoided for security.
Each octal digit is exactly three bits: 7 = 111, 5 = 101, 4 = 100. So 755 = 111 101 101, which lines up perfectly with rwx r-x r-x. See the full binary working with the binary converter.
| Decimal | Octal | Binary | Decimal | Octal | Binary |
|---|---|---|---|---|---|
| 0 | 0 | 000 | 8 | 10 | 001 000 |
| 1 | 1 | 001 | 9 | 11 | 001 001 |
| 2 | 2 | 010 | 10 | 12 | 001 010 |
| 3 | 3 | 011 | 16 | 20 | 010 000 |
| 4 | 4 | 100 | 32 | 40 | 100 000 |
| 5 | 5 | 101 | 64 | 100 | 001 000 000 |
| 6 | 6 | 110 | 100 | 144 | 001 100 100 |
| 7 | 7 | 111 | 511 | 777 | 111 111 111 |
What does the permission 750 mean, and what is it in decimal?
Enter 750 on the Octal → Decimal tab of the octal converter to confirm 488, and you'll see the binary form 111 101 000 matching rwx r-x ---.
In the 1960s, many computers used 12-, 18-, 24- or 36-bit words, all divisible by 3, so octal fit perfectly. When the 8-bit byte became the standard in the 1970s, with 16-, 32- and 64-bit processors following, groups of four bits made more sense, and hexadecimal took over. Octal survives in file permissions, aviation codes and a few programming conventions, which is why it's still worth knowing, and why a quick octal converter remains a handy tool for system administrators and students alike.
There's no direct division trick between octal and hex, but binary makes it easy. Write each octal digit as three bits, regroup the bits in fours from the right, then read each group as a hex digit. For 755₈: 7 = 111, 5 = 101, 5 = 101, giving 111101101. Regroup as 1 1110 1101, which is 1ED in hex. The converter shows all three bases together, so you can see this relationship for any number.
The most common error is typing an 8 or 9, which simply don't exist in base 8. Another is misreading octal values as decimal; 755 in octal is 493, not seven hundred fifty-five. In programming, a leading zero can silently switch a number to octal in some languages, so 0123 might be read as 83. When writing permissions or code, always be clear which base you're using.
Our octal converter works in both directions, rejects invalid digits, shows binary and hex alongside every result, and explains each step. It's a quick, reliable tool for Linux administrators setting permissions, programmers reading legacy code and students learning number bases.
Octal is a base-8 number system that uses the digits 0 to 7. Each place value is a power of 8: 1, 8, 64, 512 and so on.
Divide the number by 8 repeatedly and record each remainder. Read the remainders from the last to the first. For example, 100 becomes 144 in octal.
Multiply each digit by 8 raised to its position, starting from 0 on the right, and add the results. 17 in octal is 1 × 8 + 7 = 15.
It gives the owner read, write and execute permission (7) and gives the group and everyone else read and execute permission (5 each).
Base 8 only needs eight digits, 0 to 7. Once you reach eight, you carry over to the next place, so eight is written as 10.
Each octal digit represents exactly three binary digits, so converting between them is simply a matter of grouping bits in threes.