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
| Octal | decimal | |
|---|---|---|
| Base | 8 | 10 |
| Digits | 0–7 | 0–9 |
| Prefix in code | 0o | — |
| 255 is written | 377 | 255 |
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
= 156Octal to decimal table
Values computed by the converter itself:
| Octal | Decimal |
|---|---|
0 | 0 |
1 | 1 |
2 | 2 |
7 | 7 |
10 | 8 |
12 | 10 |
17 | 15 |
20 | 16 |
40 | 32 |
100 | 64 |
144 | 100 |
177 | 127 |
377 | 255 |
400 | 256 |
1750 | 1000 |
2000 | 1024 |
10000 | 4096 |
177777 | 65535 |
Octal to decimal in code
JavaScript
parseInt('234', 8); // 156Python
int("234", 8) # 156For 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.