HCODX/Octal to Decimal
100% browser-based · Batch conversion · Unix file permission helper

Octal to Decimal

Convert octal numbers to decimal in your browser. Useful for translating Unix file permissions (chmod) into the integer values some APIs expect.

Octal numbers
Decimal values
Convert options
Reverse (Decimal → Octal)
Input size
0 B
Output size
0 B
Numbers
0
Status
Ready
Example

Octal in, decimal out

Octal groups 3 binary bits per digit. The classic Unix permission code 644 means decimal 420 (the integer file mode some APIs require).

Octal
10
100
644
Decimal
8
64
420
Use cases

What you'll use this for

Octal lingers in Unix permissions, file modes, and a handful of legacy systems where 3-bit groupings made hardware sense.

Unix permissions

Translate chmod codes to their integer values.

Legacy compatibility

Old C constants and config files sometimes use octal literals.

Reading old memory dumps

Some historical systems wrote machine words in 3-bit octal groups.

CS homework

Quickly verify base-conversion exercises and bit-twiddling answers.

Step by step

How to convert octal to decimal

1

Paste octal numbers

One per line, or separated by spaces or commas. 0o prefixes are stripped automatically.

2

Choose strict mode

Strict rejects tokens containing 8 or 9; loose simply ignores those characters.

3

Click Convert

Or leave auto-convert on for live updates. Runs locally — no upload.

4

Copy or download

Copy to clipboard or save as .txt. Round-trip via the reverse tool to verify.

FAQ

Frequently asked questions

Mostly Unix permissions (chmod 755). Some legacy APIs and file modes.

0–7. Strict mode rejects 8/9; loose mode strips them.

Yes.

It's stripped automatically.

About

About octal-to-decimal conversion

Octal (base 8) uses the digits 0-7. It survived in Unix because each octal digit maps cleanly onto exactly three permission bits — read, write, execute — for one user class.

File permission mapping

  • 7 = 111 (rwx — all)
  • 6 = 110 (rw-)
  • 5 = 101 (r-x)
  • 4 = 100 (r--)
  • 0 = 000 (---)

So chmod 644 means owner can rw, group and others can read — and as a decimal integer file mode it's 420.

How this converter works

  • Splits input on whitespace and commas, strips any 0o prefix.
  • Parses each token with parseInt(t, 8) and emits decimal via toString(10).
  • Strict mode raises an error on stray 8 or 9 digits; loose mode silently ignores them.
Related

Related tools