About the Decimal to Octal Converter
Octal is base 8: it uses only the digits 0 to 7, and each digit stands for exactly three binary digits. It is still used for Unix file permissions, in some older computer systems and in escape sequences in code. This converter turns decimal numbers into octal. Paste one number per line and the octal values appear on the right, with an optional 0o prefix. Negative numbers keep their minus sign and large numbers are exact. Lines that cannot be read are flagged instead of being skipped. It runs in your browser, so your numbers stay on your device.
Updated October 2026
How to use the Decimal to Octal Converter
- 1Type or paste decimal numbers, one per line.
- 2Tick Add the 0o prefix if you want it in front of each result.
- 3Read the octal numbers on the right.
- 4Look at the note for any lines that could not be read.
- 5Copy the result or download it.
Why convert to octal
Most people meet octal through the Unix chmod command, where 755, 644 and 600 are common. If you have a permission value in decimal, such as from a stat output or a script, converting it shows the familiar three-digit form. Octal also appears in older documentation, in escape codes such as \033 and in some embedded systems.
The bigger picture is that octal is a compact way to write binary: each digit is three bits.
Worked examples
15 is 17 in octal because 1 times 8 plus 7 is 15. 4095 is 7777 because 4095 is 8 to the power of 4 minus 1, which is the largest four-digit octal number. 420 is 644. Paste a list of such numbers, one per line, to see them all together.
- 15 → 17
- 420 → 644
- 493 → 755
- 4095 → 7777
Check and reverse
If the result looks wrong, check that your input is decimal and not already octal or hex. To go back, use the Octal to Decimal Converter. For the other common base, use the Decimal to Hex Converter.
Using it on phone and computer
Paste decimal numbers, one per line, into the left box and the result appears straight away, so there is no button to press. On a phone, long-press the box to paste and use the Copy button to move the result to another app. On a computer you can also download it as a text file. Admins use it to turn a permission value into the three-digit form chmod expects.
Accuracy and limits
As a check, 8 gives 10 and 64 gives 100, because each octal place is worth eight times the one before it. The tool works with exact whole-number arithmetic rather than floating point, so long values are not rounded. Anything it cannot read is shown with a warning that names the line, and the rest of your list is still converted. Nothing you paste is uploaded or stored, and closing the tab removes it. If you need a back conversion, use Octal to Decimal Converter, and for bigger values the Number Base Converter.
Features
- Many numbers at once
- Optional 0o prefix
- Exact for very large numbers
- Negative numbers keep their sign
- Bad lines flagged, not dropped
- Private: nothing is uploaded
Frequently asked questions
How do I convert decimal to octal?
Divide the number by 8 again and again and write the remainders from last to first. For 493 the remainders give 755. The tool shows the result for any number you paste.
What is 493 in octal?
755. In Unix permissions, 755 means read, write and execute for the owner and read and execute for everyone else. Likewise, 420 in decimal is 644, the usual permission of a normal file.
Why is octal used for file permissions?
Each of the three permission groups (owner, group, others) has three on-off flags: read, write and execute. Three binary digits make one octal digit, so a whole permission set is written with three octal digits.
What does the 0o prefix mean?
It marks a number as octal in languages such as Python and JavaScript. Older C-style code uses a plain leading zero instead. The tool offers 0o because a leading zero is easy to misread.
Can the tool convert negative or very large numbers?
Yes. Negative numbers keep a minus sign, and the arithmetic is exact, so very long values are converted without rounding.
Is my data uploaded?
No. The numbers are converted in your browser and are not sent to a server.