Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Decimal to Octal

Decimal to Octal

Convert decimal numbers to octal. Useful for setting Unix file permissions and working with systems that use base-8 notation.

What is the Decimal to Octal Converter?

This tool converts decimal numbers (base-10) to octal numbers (base-8), a format commonly used in Unix and Linux systems.

How it works: divide by 8 repeatedly and collect the remainders, then read them from bottom to top.

Why Convert Decimal to Octal?

File Permissions

Turn permission values into chmod-style octal codes.

Programming

Octal literals appear in C, Python, and JavaScript.

Understanding Binary

Octal groups three bits together for a compact view.

Legacy Compatibility

Older systems and documentation still use octal.

The Conversion Method

Divide by 8 repeatedly and record each remainder, then read the remainders from bottom to top.

Example: 493 ÷ 8 = 61 r5, 61 ÷ 8 = 7 r5, 7 ÷ 8 = 0 r7 → 755.

How to Use

1

Enter the Decimal Number

Type any positive integer using the digits 0–9.

2

View the Octal Result

The result uses only the digits 0–7 and updates instantly.

3

Apply the Value

Copy the result to use with chmod or in your code.

Bidirectional: both fields are editable. Type an octal value in the result field to convert it back to decimal, or use the swap button to flip the direction.

Permission Calculation

For Unix permissions, each octal digit represents owner, group, and others, where 4 = read, 2 = write, 1 = execute.

ValuePermission
4read (r)
2write (w)
1execute (x)
74 + 2 + 1 = rwx (full access)
Example: to set rwxr-xr-x, use owner=7, group=5, others=5 → chmod 755.

Frequently Asked Questions

Why does the result never contain 8 or 9?

Octal is base-8, so it only uses the digits 0 through 7. The values 8 and 9 do not exist in this system.

Why is 493 equal to 755 in octal?

755 in octal is 7×64 + 5×8 + 5×1 = 448 + 40 + 5 = 493. That is why chmod 755 corresponds to the decimal value 493.

How does this help with chmod?

If you know a permission as a decimal value, convert it to octal to get the three-digit chmod code for owner, group, and others.

How do I convert octal back to decimal?

Type an octal number directly into the result field, or press the swap button to reverse the conversion direction.

0123456789
01234567
0o

Common Conversions

7 = 7
8 = 10
63 = 77
64 = 100
493 = 755
511 = 777

Decimal (Base-10)

Standard number system. Enter any positive integer to convert.

Octal (Base-8)

Base-8 system using 0-7. Essential for Unix/Linux file permission management.

Enter any positive integer
493 in decimal = 755 in octal
Useful for calculating chmod values
Result uses only digits 0-7
Want to learn more? Read documentation →
1/5
Start typing to search...
Searching...
No results found
Try searching with different keywords