What is octal to decimal conversion?
Octal to decimal conversion reads a base-8 number — using digits 0-7 only — and computes its base-10 value. Each octal digit is multiplied by 8 raised to its position; the products are summed. JavaScript implements this with parseInt(string, 8).
How do I convert chmod 755 to decimal?
Octal 755 = 7·8² + 5·8 + 5 = 448 + 40 + 5 = 493 decimal. The 9 permission bits pack as 111 101 101 = read/write/execute owner, read/execute group, read/execute other. Most filesystem APIs accept either the decimal mode or the octal literal 0o755.
Why are only digits 0-7 valid in octal?
Octal is base 8 — values 0 through 7 fit in 3 bits, exactly one octal digit. Digit 8 would mean "carry to the next position" and digit 9 makes no sense in base 8 at all. Inputs containing 8 or 9 are flagged as invalid octal.
What is the 0o prefix for?
Modern JavaScript and Python use 0o (zero-letter-o) to mark an octal literal: 0o755 = 493 decimal. The historical leading-zero notation (0755) is now ambiguous and forbidden in strict mode. This converter accepts both forms but emits the unambiguous 0o prefix.
Does the input accept the legacy 0 prefix?
Only when the rest of the string contains digits 0-7 — which a leading-zero plain-octal value does. We accept either explicit 0o prefix or just plain digits. Keep in mind that in code you should always use 0o explicitly to avoid the strict-mode error.
What is the largest octal I can convert?
Up to 17 octal digits, capped at Number.MAX_SAFE_INTEGER (2^53 − 1). Above that, JavaScript number precision degrades. For arbitrary-precision arithmetic use BigInt: BigInt("0o" + octal) parses any-length octal into an exact integer.
How does parseInt(s, 8) actually work?
It walks the digits left-to-right, multiplies the running total by 8, then adds the current digit. For "755": 0·8+7=7, 7·8+5=61, 61·8+5=493. This is Horner-method polynomial evaluation — the same algorithm used for any base.
Is the data sent to a server?
No. All conversion happens in JavaScript inside your browser. Open DevTools → Network and confirm zero requests when you click Convert. Safe for internal data, mode bits, or proprietary numeric values.