Decimal to Octal
Convert a whole number from decimal (base-10) to octal (base-8).
About the Decimal to Octal converter
This tool converts an everyday base-10 number into octal, the base-8 system that uses only the digits 0 to 7. It works by repeatedly dividing by eight and reading the remainders, so 26 becomes 32. Octal is most familiar from Unix file permissions and a handful of legacy and embedded contexts.
How to use it
- Enter a decimal whole number in the input.
- The octal equivalent appears straight away.
- Copy the result for a permission mask, script, or exercise.
A typical use is producing the octal permission code, such as 755, that chmod expects. The converter treats the input as an unsigned whole number and handles very large values exactly, so big numbers convert without rounding. It expects whole numbers, not fractions. Everything runs in your browser, so the numbers you enter are never uploaded.
Frequently asked questions
How is decimal converted to octal?
The number is repeatedly divided by eight and the remainders, read from last to first, form the octal digits. For example 26 becomes 32.
Why does octal only use digits 0 to 7?
Octal is base-8, so it has exactly eight digit values, 0 through 7. There are no 8 or 9 digits in octal.
How does this help with file permissions?
The chmod command uses octal codes, where each digit packs three permission bits. Converting a decimal value to octal gives you the familiar three-digit form like 755.
Is my input sent to a server?
No. The conversion runs in your browser, so the numbers you enter stay on your device.