Generate docx and pptx (microsoft word documents) from templates, from Node.js, the Browser and the command line / Demo:
Latest commit 1796230 Oct 5, 2018
Failed to load latest commit information.
browser Add empty browser directory Apr 16, 2016
cli Remove docxtemplater-image-module in CLI Nov 25, 2017
docs Fix faq for corrupt docs Sep 28, 2018
es6 Fix 'No tag "w:p" was found at the left' for nested loops Oct 5, 2018
examples Fix 'No tag "w:p" was found at the left' for nested loops Oct 5, 2018
test Update testing code for better browser debugging Aug 8, 2018
vendor Update testing code for better browser debugging Aug 8, 2018
.babelrc Update dependencies and babel to v7 Sep 3, 2018
.editorconfig Update .editorconfig Jul 2, 2017
.eslintignore Update build browser to use webpack Sep 16, 2017
.eslintrc Eslint allow Promise and ignore indents Mar 11, 2018
.gitignore Replace istanbul by nyc for code coverage Feb 10, 2018
.npmignore Ignore more files in .npmignore Feb 10, 2018
.prettierrc.yaml Add prettier Dec 23, 2017
.travis.yml Update .travis.yml for node <=5 Sep 3, 2018 Fix 'No tag "w:p" was found at the left' for nested loops Oct 5, 2018 Update documentation Nov 26, 2016 Fix typo Dec 27, 2017
check-casing.bash Update documentation Sep 16, 2017 Update documentation Jan 25, 2017 Update links to https version Mar 27, 2016
logo-small.png Update logo-small Dec 16, 2017
logo-tiny.png Update logos Jan 25, 2017
logo.png Update logos Jan 25, 2017
package-lock.json 3.9.1 Oct 5, 2018
package.json 3.9.1 Oct 5, 2018
profile.bash Update profiler code Mar 31, 2018
verifypublishsize.bash Make webdriver tests a little bit more robust Sep 20, 2017
webdriver.bash Update tests to use chrome && firefox by default Aug 17, 2018
webdriver.js Disable speed tests on Safari Jul 23, 2018
webpack.config.js Remove preset 2015 Jun 4, 2018


Build Status Download count Current tag CDNJS version

Browser matrix

docxtemplater logo

Join the chat at

docxtemplater is a library to generate docx/pptx documents from a docx/pptx template. It can replace {placeholders} with data and also supports loops and conditions. The templates can be edited by non-programmers, for example your clients.


Demo Site



The full documentation of the latest version can be found on read the docs.

See for information about how to migrate from older versions.

A user of docxtemplater named Timofey also created a tool to create documents easily :

You can find the tool at : , and a screencast showing how it works at

Similar libraries

They are a few similar libraries that work with docx, here’s a list of those I know a bit about:

  • docx4j :JAVA, this is probably the biggest docx library out there. There is no built in templating engine, but you can generate your docx yourself programmatically
  • docx.js: Javascript in the browser, you can create (not modify) your docx from scratch, but only do very simple things such as adding non formatted text
  • xlsx-templater : its working quite well, does the same as here but for xlsx


Functionality can be added with modules. Here is the list of existing modules:

Modules developped by docxtemplater core team members :

User contributed modules :

Professional Support

I can give your company support for installing, extending, answering support questions, or maintaining your app that runs docxtemplater. The support plan is paid per month and can be booked from