Open files in VS Code and Cursor / Office files

Open a .docx Word file in VS Code

VS Code has no Word viewer, so a .docx opens with the message that the file is binary. Install the free DOCX Viewer extension and click the file again. It opens as a read-only preview that follows your theme, with an outline, search, tables, charts and equations. No Office or LibreOffice is needed.

Install in VS CodeMarketplace pageOpen VSX (Cursor, Windsurf, VSCodium)

Free, MIT license. Extension ID zovo.docx-viewer-vscode, version 0.3.0. Needs VS Code 1.90.0 or newer.

A Word report open in VS Code in dark mode, with the heading outline on the left and a search for revenue on match 1 of 6
A Word report open in VS Code in dark mode, with the heading outline on the left and a search for revenue on match 1 of 6.

Steps in VS Code

  1. Install DOCX Viewer from the Marketplace, or press Ctrl+P (Cmd+P on macOS) and run ext install zovo.docx-viewer-vscode.
  2. Click any .docx or .dotx file in the Explorer. It opens as a preview.
  3. Press Ctrl+F (Cmd+F on macOS) to search. The match counter shows where you are, and the outline jumps to any heading.
  4. Click the theme button in the toolbar to switch between your editor colors and white paper.
  5. No .docx at hand? Run DOCX Viewer: Open Sample Document from the Command Palette.

Steps in Cursor, Windsurf or VSCodium

  1. Open the Extensions view with Ctrl+Shift+X (Cmd+Shift+X on macOS).
  2. Search for zovo.docx-viewer-vscode and click Install. Cursor, Windsurf and VSCodium install from Open VSX, where it is published as zovo/docx-viewer-vscode.
  3. If your editor has no gallery, download the .vsix from the Open VSX page and run "Extensions: Install from VSIX...".
  4. Then use it the same way as in VS Code.

What DOCX Viewer handles

What it does not do

Other options

Install counts and Open VSX status were checked on 8 November 2026. Descriptions in quotes are the extensions' own.

Questions

Can VS Code edit a Word document?

Not with DOCX Viewer, which is read-only. To change the text, open the file in Word, LibreOffice Writer or Google Docs.

Can I see what changed in a .docx between two Git commits?

Yes. Run "Compare with Git HEAD" and VS Code shows the two versions as Markdown side by side. It compares text and structure, not font, color or picture-only changes.

Does it need Microsoft Office?

No. The extension is a 0.5 MB download. It works offline, makes no network calls and has no telemetry.

More about DOCX Viewer

Read the DOCX Viewer page for every feature and setting, or the source code on GitHub.

Support this work

If this extension saves you time, you can support the work on GitHub Sponsors. Monthly tiers start at $5, and one-time tiers start at $15. Sponsorship is optional, and the tool works the same without it.