Decimal to Octal
Convert decimal numbers to octal (base 8). Unix file permissions are octal; this tool also covers the rare-but-real cases where octal is the right representation.
Decimal in, octal out
Each decimal number is emitted in base 8. 420 in decimal is 644 in octal — the chmod code for read/write owner, read group, read other.
8 64 420
10 100 644
What you'll use this for
Octal lives on in Unix file permissions and a handful of legacy contexts — that's the niche this tool serves.
Unix file permissions
Compute chmod octal codes from desired bit-by-bit permissions.
CS homework
Verify base-10 to base-8 conversions for assignments.
Memory dumps
Convert raw decimal byte values to octal for systems that use it natively.
Compatibility with old systems
Some legacy tools and minicomputer manuals still favor octal.
How to convert decimal to octal
Paste decimal numbers
One per line or separated by spaces or commas. Negative values are skipped.
Pick padding and prefix
Pad to 3 chars for chmod-style permissions, or longer widths for word-aligned octal.
Click Convert
Or leave auto-convert on for live updates. Runs entirely in your browser.
Copy or download
Copy to clipboard or save as .txt. Use the reverse tool to round-trip back to decimal.
Frequently asked questions
Mostly file permissions (chmod 755), occasionally legacy systems. Hex is more common today.
Optional. Modern JS / Python recognize 0o for octal literals.
Yes.
53-bit JS limit.
About octal
Octal is base 8 — it uses the digits 0-7. Each octal digit represents exactly three binary bits, which is why it lines up so neatly with Unix file permission triplets (read / write / execute).
Where you'll see it
- chmod —
chmod 755 filesets rwx for owner, rx for group and other. - Older systems — PDP-8/11 minicomputers used 12- and 16-bit words that displayed cleanly in octal.
- Programming literals —
0o755in JavaScript and Python,0755in C.
When to prefer hex
- Hex (base 16) aligns with bytes and 32/64-bit words better than octal.
- For anything other than file permissions, hex is almost always the right call.
- If you need hex instead, jump to Binary to Hex or Hex to Binary.