plain/devtools home

Octal to decimal

Each octal digit is a power of 8, counting from the right starting at 1. Multiply and add. Octal 17 is 1 x 8 + 7 = 15.

Last reviewed 2026-11-04.

number-basesampless sample

never leaves your browser

Worked example: 755

7 x 64 + 5 x 8 + 5 x 1 = 448 + 40 + 5 = 493. So octal 755 is decimal 493.

Examples

OctalDecimal
1715
6452
377255
644420
755493
777511

Decimal to octal

Divide by 8 and read the remainders from last to first. 493 / 8 = 61 r 5, 61 / 8 = 7 r 5, 7 / 8 = 0 r 7, giving 755.

Why octal still matters

Each octal digit is exactly three bits, which is why Unix file modes are written in octal: 755 is 111 101 101. See chmod 755 vs 644.

In code

$ parseInt('17', 8)  // 15
(493).toString(8)  // '755'
0o17               // 15 (literal)

Running this on a server

Servers for small tools are compared in the hosting guide.

Frequently asked questions

What is octal 17 in decimal?

15.

Which digits does octal use?

0 to 7. The digits 8 and 9 are invalid.

Why does a leading 0 matter?

In some languages 017 is octal (15), not seventeen. Modern JavaScript uses 0o17 and rejects the old form in strict mode.

Sources

Related

esc
↑↓ move↵ open? all shortcuts

Keyboard shortcuts

Cmd or Ctrl shortcuts always work.
Everywhere
Everywhere
Open the command palette
CtrlK
Open the palette (outside a text field)
/
Show these shortcuts
?
Toggle light and dark theme
t
Go home
gh
Go to all tools
gt
On a tool page
On a tool page
Run the main action
Ctrl↵
Copy the output
c
Load the next sample
s
Focus the input
i
Leave a text field
Esc
Previous or next tool
[]
In the palette
In the palette
Move the selection
↑↓
Open the selected item
↵
Close
Esc