Octal Converter
Convert between octal and decimal (and binary/hex) - exact conversion for arbitrarily large numbers.
Enter a number in any base below - this tool converts it to and from octal (base 8) accurately.
Edit either field - the other updates automatically. Supports integers up to JavaScript's safe integer limit (2^53-1).
More Data / Number / Computer Science Tools
View all 19For dedicated binary/hex converters, see the Binary to Decimal and Hex to Decimal Converters - or the general Number Base Converter for any base.
What Is Octal?
Octal (base 8) uses digits 0-7, where each position represents a power of 8 - historically common in computing (especially Unix file permissions, like chmod 755) because it maps cleanly onto groups of 3 binary bits.
How to Use It
- Enter a number and select its current base (octal, decimal, binary, or hex).
- Select the target base.
- The converted value appears instantly, with invalid digits for the selected base flagged clearly.
Limitations
This handles non-negative integers accurately using BigInt for arbitrarily large values - fractional values aren't supported, since octal fractions require a different interpretation than whole-number octal.
Example: Unix Permissions
Octal's best-known use is file permissions. In chmod 754, each digit is three bits:
| Octal | Binary | Permission |
|---|---|---|
| 7 | 111 | rwx (read, write, execute) |
| 5 | 101 | r-x (read, execute) |
| 4 | 100 | r-- (read only) |
So 754 means the owner can do everything, the group can read and run, and others can only read. The chmod Calculator does this translation for you.
Converting Octal to Decimal
755 in octal = 7 × 64 + 5 × 8 + 5 × 1 = 448 + 40 + 5 = 493 in decimal.
Octal in Programming
- Python and modern JavaScript write octal as
0o755. - C, and older JavaScript, treat a leading zero as octal:
010is 8, which causes real bugs when numbers such as postcodes are stored with a leading zero. - Octal escape sequences such as
\033(the escape character, 27) appear in terminal colour codes.
Read our guide to Linux file permissions, or convert between any bases with the Number Base Converter.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.