npm is the easiest way to install docxtemplater

npm install docxtemplater
npm install jszip@2

jszip version 2 is important ! It won’t work with jszip version 3

If you want to use the command line interface, you should use the global flag:

npm install docxtemplater --global


You can find .js and .min.js files for docxtemplater on this repository :

You will also need JSZip version 2.x, which you can download here :

Build it yourself

If you want to build docxtemplater for the browser yourself, here is how you should do :

git clone
cd docxtemplater
npm install
npm test
npm run compile
./node_modules/.bin/browserify -r "./js/docxtemplater.js" -s docxtemplater > "browser/docxtemplater.js"
./node_modules/.bin/uglifyjs "browser/docxtemplater.js" > "browser/docxtemplater.min.js" --verbose --ascii-only

Docxtemplater will be exported to window.docxtemplater for easy usage.

The generated files of docxtemplater will be in /browser (minified and non minified).


You can use bower to install docxtemplater

bower install --save docxtemplater