.docx.
How it works
SuperDoc compares two documents at the paragraph level, detects what changed, and replays those changes onto the base document as tracked changes. The result looks exactly like a Word redline.- Compare — Diff the document trees, comments, styles, and numbering
- Replay — Apply the differences as tracked changes with author attribution
- Review — Accept or reject each change using the standard Track Changes workflow
Two paths
Client-side
Compare documents in the browser using editor commands. Best for interactive review UIs where users pick two files and see the redline immediately.
Server-side
Compare documents headlessly with the Node.js or Python SDK. Best for automation — CI pipelines, webhook handlers, or batch processing.
What gets compared
| Content | v1 support |
|---|---|
| Body text and formatting | Yes |
| Comments | Yes |
| Styles | Yes |
| Numbering / lists | Yes |
| Headers and footers | Not yet |
Output
The comparison produces a document based on the base document with all differences from the target surfaced as tracked changes. Comments, styles, and numbering changes are applied directly. Export the result as a.docx file and it opens in Microsoft Word with the tracked changes intact.
Example
Diffing example
Side-by-side comparison demo with bidirectional tracked changes
Related
- Track Changes — Accept/reject workflow for reviewed changes
- Diffing extension — API reference for
compareDocumentsandreplayDifferences - diff.capture, diff.compare, diff.apply — Document API operations

