What it is and when to use it
Octal is the base-8 number system, using only the digits 0 to 7. Each octal digit stands for exactly three binary digits, which made it a convenient shorthand in early computing and still keeps it useful today. Its best-known use is Unix and Linux file permissions, where chmod values such as 755 and 644 are octal numbers.
Use this converter to move a value between octal, decimal, binary and hexadecimal in one step: pick the base of the number you have, type it in and read all four forms. If you enter a three or four-digit octal value, it also breaks it into owner, group and other permissions, with the read, write and execute bits. It handles very large values exactly.
How octal conversion works
Each octal digit is weighted by a power of 8, starting from 8⁰ on the right. The value is d₂ × 8² + d₁ × 8¹ + d₀ × 8⁰ for a three-digit number, where each d is a digit from 0 to 7.
To go from octal to binary, replace each digit with its three-bit equivalent (7 = 111, 5 = 101, 0 = 000). To go the other way, group binary digits in threes from the right. For permissions, each digit adds read (4), write (2) and execute (1), so 7 = rwx, 5 = r-x, 6 = rw- and 4 = r--.
Hexadecimal is converted through the decimal or binary form, which the calculator does automatically.
Worked example: octal 755
Enter 755 with the input type set to octal.
Decimal: 7 × 64 + 5 × 8 + 5 × 1 = 448 + 40 + 5 = 493. Binary: 111 101 101, displayed grouped in fours as 1 1110 1101. Hexadecimal: 493 = 1 × 256 + 14 × 16 + 13, which is 0x1ED.
As Unix permissions, 755 is rwxr-xr-x: the owner can read, write and execute, while the group and everyone else can read and execute. This is a typical setting for directories and executable scripts.
Common mistakes and how to interpret the result
- Typing digits 8 or 9 in an octal field. They do not exist in base 8, so the converter reports an error and asks for digits from 0 to 7.
- Confusing a leading zero. In many programming languages a leading 0, as in 0755, marks a number as octal, but it is not part of the value. Remove it or use the 0o prefix, which the converter accepts.
- Setting overly open permissions. 777 lets any user write to a file, which is rarely appropriate. Grant only what is needed, such as 644 for regular files.
- Reading a permission as decimal. The chmod value 755 is not the decimal number 755. It has to be read digit by digit.