Skip to content

Decimal to Octal Converter

Type a whole number to see it in octal, worked out by repeated division by 8.

Decimal uses only the digits 0–9

In octal (base 8)

755

Decimal 493 is 755 in octal (base 8).

8264
818
801

7×64 + 5×8 + 5 = 493

Tap a digit to step it up. Each tile is worth its digit × 8n.

Bytes in memory2 bytes, big- and little-endian
Big-endiannetwork order01+0ED+1
Little-endianx86 and ARM memoryED+001+1

The +0, +1 … under each byte is its address offset. Big-endian puts the most significant byte first; little-endian puts it last.

How to convert decimal to octal

Divide by 8 and keep the remainder (0 to 7). Divide the quotient by 8 again, and continue until the quotient is 0. The remainders read from last to first are the octal digits.

For 420: 420 ÷ 8 = 52 r 4, 52 ÷ 8 = 6 r 4, 6 ÷ 8 = 0 r 6. Reading upward gives 644, the usual permission for a file that its owner can edit and everyone can read.

Through binary also works: write the number in binary and split it into groups of three bits from the right; each group is one octal digit.

n = 8 × q + r, with r from 0 to 7

Common Unix permission modes

Each mode as octal (what chmod takes), as symbols (what ls -l shows) and as a decimal number.

Each mode as octal (what chmod takes), as symbols (what ls -l shows) and as a decimal number.
OctalSymbolicDecimalTypical use
400r--------256read-only key file (SSH)
444r--r--r--292read-only for everyone
600rw-------384private file
640rw-r-----416config readable by a group
644rw-r--r--420normal file
664rw-rw-r--436shared file in a group
700rwx------448private folder or script
750rwxr-x---488program for one group
755rwxr-xr-x493program or public folder
775rwxrwxr-x509shared group folder
Show all 11 rows
777rwxrwxrwx511everyone can do everything (avoid)

Frequently Asked Questions

What is 8 in octal?

Eight is 10 in octal: there is no digit 8, so the count rolls over to the next place, the same way 9 + 1 becomes 10 in decimal.

How do I get the octal permission from rwxr-xr-x?

Score each group of three: r = 4, w = 2, x = 1. rwx = 7, r-x = 5, r-x = 5, so the mode is 755.

Can I convert a decimal fraction to octal?

Yes, by multiplying the fraction part by 8 repeatedly and taking the whole-number parts as digits (0.5 is 0.4 in octal). This converter handles whole numbers.