Every decimal number has an octal twin, and this page shows you the twin live as you type. Enter 100 and the tool returns 144; enter 511 and it returns 777. The conversion treats your input as one whole integer of any size, computing the exact base-8 representation with arbitrary-precision arithmetic inside your browser. Nothing is uploaded, the tool is free with no signup, and the same page works on a phone during a lecture as on a workstation mid-script.
Decimal-to-octal conversion is one of the classic teaching exercises because it cannot be done by substitution. There is no clean digit mapping between base 10 and base 8 the way there is between base 8 and base 2, so the conversion actually requires division, which makes it the standard example for teaching positional notation in reverse. Once you can hop between bases 10 and 8, jumping to binary or hex feels easy because those convert by regrouping.
Octal matters less today than hexadecimal, but it owns one enduring niche: Unix file permissions. When a script needs to verify that a directory is mode 755, or a config file stores an integer that turns out to be a permission pattern, converting decimal to octal is the move that makes the number legible again.
What Base 8 Notation Means
Octal writes numbers using eight digits, 0 through 7, with positions weighted by powers of 8: ones, eights, sixty-fours, five-hundred-twelves, and upward. The octal number 144 means 1 times 64 plus 4 times 8 plus 4, which is 64 plus 32 plus 4, exactly 100 in decimal. Each position is worth eight times the one to its right, which is why octal numbers need more digits than decimal for the same value: 255 decimal, which fits in three decimal digits, is 377 in octal, also three digits, but 4096 decimal needs 10000 octal, five digits.
Because 8 is 2 to the third power, each octal digit corresponds to exactly three bits. That relationship is why 511 becomes 777: 511 in binary is 11111111, which groups into 011 111 111, reading as 777. This is also why permission digits never exceed 7, and why seeing an 8 or 9 in what claims to be an octal number is always an error.
How to Use This Tool (Step by Step)
- Type your decimal integer into the input box. Negative signs and decimal fractions are not part of this converter; it handles non-negative whole numbers of any length.
- The octal result updates live with every keystroke, so you can watch digits change as you edit.
- If the input contains anything other than decimal digits, an error message names the invalid character rather than guessing.
- Click copy to move the result into your code, terminal, or worksheet.
- To verify, paste the octal output into the companion octal-to-decimal tool; the original number should come back.
How It Works: Repeated Division by 8
The hand method is repeated division, and it is worth knowing because it is the algorithm the tool implements. Divide the number by 8, keep the remainder as the rightmost octal digit, then repeat on the quotient until it reaches zero. The remainders, read bottom to top, form the octal number.
Convert 100 as a worked example. 100 divided by 8 is 12 with remainder 4. Then 12 divided by 8 is 1 with remainder 4. Then 1 divided by 8 is 0 with remainder 1. Reading the remainders from last to first gives 144, so 100 decimal is 144 octal. Check by expanding: 1 times 64 plus 4 times 8 plus 4 equals 100. The same loop converts any integer, and each division step is cheap, which is why even hundred-digit inputs convert instantly.
| Decimal input | Division trail (quotient / remainder) | Octal result |
|---|---|---|
| 8 | 8 to 1 r 0; 1 to 0 r 1 | 10 |
| 100 | 100 to 12 r 4; 12 to 1 r 4; 1 to 0 r 1 | 144 |
| 255 | 255 to 31 r 7; 31 to 3 r 7; 3 to 0 r 3 | 377 |
| 493 | 493 to 61 r 5; 61 to 7 r 5; 7 to 0 r 7 | 755 |
| 511 | 511 to 63 r 7; 63 to 7 r 7; 7 to 0 r 7 | 777 |
| 1000 | 1000 to 125 r 0; 125 to 15 r 5; 15 to 1 r 7; 1 to 0 r 1 | 1750 |
The 493 row is the practical one for sysadmins: 493 is the decimal value a library reports for mode 755, and the division trail recovers the familiar digits directly. The 1000 row shows why the bottom-up reading matters; the remainders come out 0, 5, 7, 1 and must be reversed to 1750.
Common Use Cases
- Producing chmod arguments from library values: when a programming API reports a file mode as decimal, convert it to octal to get the number chmod understands.
- Learning positional notation: repeated division is the standard classroom method, and checking your remainders against a live tool cements the algorithm.
- Interpreting old data formats: tar archives, some log formats, and legacy configuration files store numeric fields as octal text, so converting your decimal target tells you what string to search for.
- Cross-checking bit fields: embedded documentation that lists a register value in decimal is easier to align with 3-bit hardware fields once it is in octal.
- Puzzle chains: escape-room and CTF sequences frequently bounce between bases; this is the leg that goes back toward the octal layer.
Decimal-to-Octal Compared with Decimal-to-Hex
The algorithms are identical except for the divisor: 8 for octal, 16 for hex. What differs is the output's shape. Octal digits map to 3-bit groups, so the result aligns with permission triples and legacy word sizes; hex digits map to 4-bit groups, so the result aligns with bytes and modern word sizes. 255 becomes 377 in octal and FF in hex, both correct views of the same eight bits.
Choose octal when the destination is chmod, umask, a tar field, or anything Unix-permission shaped. Choose hex when the destination is an address, a byte-level protocol, or a color code. If you only need the raw bits underneath, converting decimal to binary directly is another path, though its output is eight times longer per byte and harder to eyeball.
Tips and Best Practices
- Read remainders bottom-up; writing them top-down in order is the single most common hand-conversion mistake, and it produces digits that are a permutation of the right answer.
- Sanity-check digit count: each octal digit covers a factor of 8, so 100 decimal needs three octal digits, and a two-digit answer is automatically wrong.
- Verify by expansion, not by eye: multiply the digits back through the 64, 8, 1 weights and confirm the original decimal total.
- When writing octal literals in code, prefix with a leading zero or an explicit 0o marker per your language's rules; a bare 144 in C means one hundred forty-four, not one hundred.
- For permission arithmetic, keep the shortcuts handy: 493 is 755, 420 is 644, 384 is 600, and 511 is 777.