Validate Office Open XML files in nodejs the browser
Install
pnpm install @ooxml-tools/validate --save
CLI
Once installed run
ooxml-validate ./test.docx
All the options can be seen with
ooxml-validate --help# ooxml-validate <filepath>## validate docx files## Positionals:# filepath filepath of OOXML file [string]## Options:# --help Show help [boolean]# --version Show version number [boolean]# --office-version, --ov office version used for validation# [choices: "Microsoft365", "Office2007", "Office2010", "Office2013",# "Office2016", "Office2019", "Office2021"] [default: "Microsoft365"]# --output-format, --of format of output# [choices: "pretty", "json"] [default: "pretty"]# -f, --format document format (should be auto-detected)# [choices: "xlsx", "pptx", "docx"]
Usage
Pass an ArrayBuffer as input and get results as output
Where version of one of ["Microsoft365", "Office2007", "Office2010", "Office2013", "Office2016", "Office2019", "Office2021"]
Development
[!NOTE]
If you don't feel like installing all the dependencies you can run the following
./docker.sh
This will start a docker shell with all the dependencies installed. The following commands can then be run in that shell without installing any dependencies (other then docker/docker-compose)
You'll need dotnet 8 installed locally, to whether it's installed run dotnet --version.
You'll also need to install the node_modules via
pnpm install
Build the library run
pnpm run build
The built npm package will be output to ./dist/npm/*
The library is huge, and slow. It's currently base64 encoding the WASM because of the issues getting WASM building across bundlers (help wanted)
The library base64 encodes the input OOXML file, which is slow. We should be using streaming (help wanted)
The C# is probably very poor quality... I'm not a C# developer (help wanted)
Licence
MIT
FAQs
Validate Office Open XML files in nodejs the browser
The npm package @ooxml-tools/validate receives a total of 636 weekly downloads. As such, @ooxml-tools/validate popularity was classified as not popular.
We found that @ooxml-tools/validate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.
Package last updated on 09 Jun 2026
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.