Octal to decimal converter

Turn base-8 numbers into decimal.

From
To

0 lines · 0 characters

0 lines · 0 characters

Results update as you type.

Runs in your browser. Nothing uploaded.

How to convert octal to decimal

  1. Paste octal numbers into Input, one per line. A 0o prefix or a leading 0 is fine.
  2. The decimal value of each line appears as you type.
  3. Copy the result. Any line containing 8 or 9 is flagged, since octal only uses the digits 0 to 7.

Converting octal to decimal by hand

Octal places are worth powers of 8: 1, 8, 64 and 512. Multiply each digit by its place value and add. For 755:

Digit 7 5 5
Place value 64 8 1
Product 448 40 5

448 + 40 + 5 = 493. The same steps turn 644 into 6 × 64 + 4 × 8 + 4 = 384 + 32 + 4 = 420. Past 7 the count carries, so octal 10 is 8, 20 is 16 and 100 is 64.

Permission digits

Octal Binary Permissions
0 000 ---
1 001 --x
2 010 -w-
3 011 -wx
4 100 r--
5 101 r-x
6 110 rw-
7 111 rwx

A three-digit mode gives the owner, the group and everyone else one digit each, in that order. So chmod 644 means rw-r--r--, the usual mode for ordinary files, and chmod 755 means rwxr-xr-x, the usual mode for folders and programs. Single octal digits have the same value in decimal, so conversion only matters for the whole mode: 755 read as one number is 493.