Native DOCX creation, editing, comparison, layout, and rendering
open sourceMIT OR Apache-2.0self-hostablefree
rdocx is a Rust document stack for Word files: one Document that creates, opens, edits, validates and saves .docx packages, keeps XML it doesn't model byte for byte, and lays the result out with its own engine to export PDF, PDF/A, page images, HTML, Markdown, ODT, RTF and EPUB without Microsoft Word or LibreOffice. The same engine is exposed as the rdocx command-line tool (crate rdocx-cli), a Python package and a locally built WebAssembly package. The CLI inspects, converts, renders, compares and validates documents, fills content controls, manages comments and accepts or rejects tracked revisions. Converting to PDF shows the accepted text by default; --revision-view tracked shows both sides of tracked changes, and --revision-style legal colours insertions blue with a double underline and deletions red and struck through. Tensorbee started it in February 2026.
Problems it solves
- convert DOCX to PDF from a shell script without installing Word or LibreOffice
- render a Word redline to PDF so both the inserted and the deleted text show
- produce a legal-style comparison PDF with blue double-underlined insertions and red struck deletions
- compare two versions of a Word document and get a tracked-changes .docx
- accept or reject tracked changes in a Word file by author or date from the command line
- open a customer's Word template, replace placeholders and save it without losing parts my code doesn't understand
- fill Word content controls from a JSON file in a batch job
- create Word documents with styles, tables and numbering from Rust
- export a .docx to HTML or Markdown for a web page or an LLM pipeline
- check a Word file for broken relationships and missing styles before sending it out
- rasterise pages of a Word document to PNG for previews
- edit and render Word documents from Python without Office installed
- add, reply to or resolve comments in a Word document from a script
- rebuild the table of contents of a Word file without opening Word
Features
- create, open, edit, validate and save .docx, .docm, .dotx and .dotm packages
- keeps unmodelled XML byte for byte when saving
- native Word layout with bundled metric-compatible fonts for deterministic output
- PDF, PDF/A, PNG, JPEG, TIFF and SVG output
- HTML, Markdown, MHTML, RTF, ODT and EPUB output
- tracked changes rendered with --revision-view tracked, optionally in a legal colour style
- document comparison at run, word or character granularity into a tracked-changes .docx
- list, accept and reject tracked revisions by id, author or date range
- comment threads: list, add, reply, resolve and remove
- content control and legacy form filling from --tag or JSON values
View 3 more
- placeholder replacement, field cache updates and table of contents rebuilds
- opt-in agile encryption and digital signatures
- rdocx CLI, Python package and WebAssembly package over the same engine
Limitations
- Doesn't open binary Word .doc or Word 2003 XML files: the README calls them permanent non-goals1
- Doesn't export the tracked-changes view to HTML or Markdown: those conversions refuse --revision-view tracked2
- Doesn't run macros, ActiveX, OLE objects or add-ins: it keeps them in the file without executing them1
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has official SDKs | plan not known |
Alternatives
The same job
These do what rdocx does.
- docxide-pdf Library and CLI for converting DOCX files to PDF, matching Microsoft Word's output as closely as possible
- jubarte Word-faithful DOCX redlines and rendering, without Word
- Aspose.Words Create, edit, render and convert Word documents to multiple formats without using external software
- python-docx Create and modify Word documents with Python
- docx4j JAXB-based Java library for Word docx, Powerpoint pptx, and Excel xlsx files