Compare Word (.docx) documents side by side with their formatting, directly from VS Code's git views and pull requests.
Features
Normal Explorer clicks leave .docx files to VS Code's default behavior or your chosen editor; they do not start a comparison.
Opens automatically for .docx diffs in the Source Control view, commit history, staged changes and the GitHub Pull Requests view.
Right-click a .docx file and choose Compare DOCX: Compare a commit from any branch with its previous version to select a commit affecting that file across local branches and fetched remote refs. The selected commit is compared against its first parent. Filter by message, author or hash, and use Load older commits for earlier history. Fetch remote branches first to include commits not yet available locally.
Pull requests compare the PR's version against the current tip of the target branch.
Both versions are rendered with their formatting: fonts, emphasis, colors, tables, lists, headers, footers, footnotes, comments and tracked changes.
Changed paragraphs are highlighted: yellow for edited, green for added, red for removed. Use ▲ / ▼ to jump between changes; the two panes scroll together.
Limitations
Only text differences are highlighted. A paragraph whose text is unchanged but whose formatting changed is not flagged.
Rendering is an HTML approximation of Word's layout; page breaks and positioning can differ from Word.
Requirements
Git on the PATH and the document inside a git repository.
For pull requests, the GitHub Pull Requests extension.
Editor selection
The diff viewer is optional, not the default document editor. Use Source Control or pull request diffs, or right-click a file in Explorer and choose a Compare DOCX command.
If you previously selected DOCX Diff Viewer as the default, use Reopen Editor With... → Configure default editor to choose another editor, or remove the *.docx mapping to docxCompare.diffViewer from your user/workspace workbench.editorAssociations setting. An explicit editor association overrides the extension's optional priority.