--- id: msoffcrypto-tool version: "6.0.0" license: MIT license_treatment: permissive maintenance: aging --- # msoffcrypto-tool — Python tool and library for decrypting and encrypting MS Office files using a password or other keys License: permissive · Maintenance: aging · Downloads: 12.4M/mo ## What it is and what it does msoffcrypto-tool is a Python library and command-line tool for working with password-protected and encrypted Microsoft Office documents. It handles both modern OOXML formats (Word 2007+, Excel 2007+, PowerPoint 2007+) and legacy binary formats (Word 97–2003, Excel 97–2003, PowerPoint 2002–2003), supporting ECMA-376 Agile and Standard encryption, RC4 CryptoAPI, and XOR obfuscation schemes. The tool can verify passwords before decryption on supported formats and supports multiple key types: passwords, intermediate keys, and private keys for escrow certificates. You can use it as a standalone CLI tool to decrypt files with a password prompt or command-line argument, test whether a file is encrypted, or encrypt plain OOXML documents. As a library, it provides fine-grained control over key loading, in-memory decryption, and optional integrity verification. The package depends on cryptography for cryptographic operations and olefile for parsing Office binary containers. Use it for: - Decrypt password-protected Word, Excel, or PowerPoint files in batch workflows or automation scripts. - Analyze encrypted malicious Office documents (maldocs) in security research or incident response. - Extract data from encrypted spreadsheets into memory for processing with pandas or other data tools. - Verify password correctness before decryption on ECMA-376 Agile/Standard encrypted files. - Programmatically encrypt plain OOXML documents with passwords for secure distribution. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Decrypts and encrypts Microsoft Office files (Word, Excel, PowerPoint) protected with passwords or cryptographic keys, supporting both modern OOXML and legacy binary formats. Yes, if you need to decrypt or encrypt Microsoft Office files. The package is permissively licensed, has low install friction, and covers a wide range of encryption schemes. However, maintenance is aging (last release 214 days ago), and the encryption feature is experimental—use decryption for production workflows but treat encryption as beta. No known security vulnerabilities. ## Install pip install msoffcrypto-tool uv add msoffcrypto-tool poetry add msoffcrypto-tool ## Installing msoffcrypto-tool Before you install: Low friction install with only two runtime dependencies (cryptography and olefile). Maintenance status is aging—last release was 214 days ago—but the repository remains active and not archived, with a modest user base of 619 stars. License in practice: MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you retain the license notice. Quickstart: pip install msoffcrypto-tool import msoffcrypto encrypted = open("encrypted.docx", "rb") file = msoffcrypto.OfficeFile(encrypted) file.load_key(password="Passw0rd") with open("decrypted.docx", "wb") as f: file.decrypt(f) encrypted.close() Requires Python 3.10 or later (supports up to 3.14); encryption feature is marked experimental. Verify before relying: - Whether the experimental encryption feature is production-ready or suitable only for non-critical workflows. - Performance characteristics when handling large Office files or batch decryption scenarios. - Compatibility with Office files encrypted using non-standard or proprietary key derivation methods. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 12.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags decrypt password protected office files, ms office encryption decryption, word excel powerpoint password removal, office file cryptography tool, ooxml binary document decryption, office-automation, cryptography, cli-tool [View on SkillFed](https://skillfed.io/packages/msoffcrypto-tool) · [View on PyPI](https://pypi.org/project/msoffcrypto-tool/)