Octal to decimal

Convert octal to decimal as you type, with any number of digits, the method step by step and a reference table.

loading Octal to decimal
About this tool

Octal and decimal

Octal (base 8) groups bits three by three; today it survives mostly in Unix permissions such as chmod 755. Decimal (base 10) is the everyday system: each digit is worth a power of 10.

The most common octal today is a Unix permission: 755 is 493 in decimal, which is what some APIs (Node’s fs.chmod, Python’s os.chmod without 0o) receive.

This page opens the base converter with octal as the input; it shows binary, octal, decimal, hexadecimal and Base64 at once, accepts prefixes such as 0x, 0b and 0o, and works with numbers of any length (no 2^53 limit). It runs in your browser.

Octal vs decimal

Octaldecimal
Base810
Digits0–70–9
Prefix in code0o—
255 is written377255

How to convert octal to decimal by hand

Multiply each digit by the power of 8 of its position (counting from 0 on the right) and add everything. For 234:

2 × 8^2 + 3 × 8^1 + 4 × 8^0
= 128 + 24 + 4
= 156

Octal to decimal table

Values computed by the converter itself:

OctalDecimal
00
11
22
77
108
1210
1715
2016
4032
10064
144100
177127
377255
400256
17501000
20001024
100004096
17777765535

Octal to decimal in code

JavaScript

parseInt('234', 8); // 156

Python

int("234", 8)  # 156

For integers beyond 2^53 in JavaScript, use BigInt: BigInt("0x…").toString(10).

Frequently asked questions

Does it handle very large numbers?

Yes. The converter uses arbitrary-precision integers (BigInt), so a 256-bit hash or a 100-digit number converts exactly; JavaScript Number would lose digits above 2^53.

Can I convert negative numbers or fractions?

Negative integers keep their sign (-255 → -FF); the tool does not write two’s complement or fractional digits. For a two’s complement byte, add 256 first (−1 → 255 → FF).

Why do programmers use hexadecimal instead of binary?

Because it is binary in short form: 4 bits per digit, 2 digits per byte, so 0xFF is easier to read than 11111111 and still maps bit for bit.

Report a problem