You are currently offline, serving cached version

Powerful Word,
Powerpoint and Excel generation

Generate docx, pptx or xlsx from inside your
application with {tags} using Javascript

import Docxtemplater from "docxtemplater";
const doc = new Docxtemplater(document1);
doc.render({ firstname: "John" });
Dear {firstname},
import Docxtemplater from "docxtemplater";
const doc = new Docxtemplater(presentation1);
doc.render({ title: "Lorem ipsum" });
import Docxtemplater from "docxtemplater";
const doc = new Docxtemplater(spreadSheet1);
    items: [
            description: "description...",
            unit_price: 200,
            quantity: 18,
DescriptionUnit priceQuantity

Paid version trusted by 500+ companies

General Electric
Tribunal de Contas da União
RegSmart Life Science AB
tempus no
COFRAC French Accreditation Committee
DLR German Aerospace Center
Smart Public
Government of New South Wales
GASAG is the main natural gas supplier and vendor in Berlin
Download count

Why use docxtemplater?

Template-based approach

docxtemplater relies on a template-based approach, anyone that knows how to use Word can modify the look of the generated documents.

You can let your own customers edit the Word template!

Reports, contracts and documents

With docxtemplater, you write a document template using Word or Powerpoint and filling it with tags such as `{user}`. You can call docxtemplater using Node.JS or in the browser with Javascript. The engine will take your input data as JSON and generate a document with all fields replaced by their values.

Support < 48h

If you buy a license for docxtemplater paid software, you get support per email within 48 hours to help you for any problems you may have.

For the Entreprise Plan, the response time is of 24 hours.


Repeat a section in your template, or show/hide a section.

  • Loops :
  • Conditions :
    You're the admin

Easy to install and maintain

In a few minutes you can install docxtemplater on npm, create your first template and generate some docx from Javascript objects or JSON.

Runs on Node.js and major browsers

docxtemplater is tested with all active Node.js versions 12 up to version 20, and in all common browsers (Chrome,Firefox,Safari,IE9+).

Highly customizable

You can customize a lot of things with docxtemplater :

  • Define data filters to process data using your business logic. For example : { | upper } or {#companies | where:'revenue > 1000'}

Docx, Pptx, Xlsx

Docxtemplater works with the 3 major office document formats :

  • Docx : Microsoft Word
  • Pptx : Microsoft Powerpoint
  • Xlsx : Microsoft Excel

The open-source core supports only docx and pptx, for xlsx, you need to have access to the XLSX Module

Full Documentation

docxtemplater has extensive documentation to get started, and configure the generation..

For questions about our paid modules, see our commercial FAQ and our technical FAQ.

Very robust

For each feature, we write a full suite of tests with real Word documents to ensure that the generated documents are correct. Our current mutation testing score measured by Stryker Mutator is at 90%, which is very high and allows us to develop features without fearing of breaking existing usecases.

Watch Docxtemplater explanation video

3 minutes

Loved by our customers

Michelle CEO of Tech company

Without docxtemplater we would'nt have been able to ensure data consistency which is what our clients expect. Any time we had an issue, the support team was alway present to respond quickly.

Erik Kramer Founder and CEO at Cloud++ B.V

The docxtemplater module helped our company a lot - it works well, even with a complex setup. I would personally like to thank the author, Edgar Hipp, for quick responses and fixes if they were needed. Edgar generally responded to our emails within a working day and fixed most bugs within 2 working days.

Anonymous Senior Software Engineer, NY-based Web Application Development Company

Docxtemplater has been a spectacular library to use for generating documents from custom templates. It contains a wide array of features, including styling with HTML, images, and merging multiple documents together, all of which we use extensively. Edgar has been quick to respond to any concerns or usecases that we wanted to support, and we appreciate all the work that he has done for this library. We greatly advocate the use of his library, for it is a awesome library backed by an awesome developer!

Allan Ebdrup CTO at Debitoor

Once again: This is an awesome module!

Paulo Castagnari CTO - Azume

One of our core features is business proposals generation, which previously we were able to by using the browser's native print for saving an HTML template as a PDF file, however with a very limited degree of customization.

Now, with docxtemplater we are able to offer our customers much more customized business proposals. All of that with an affordable price and unlimited document generation (differently than many other SDKs out there, which are extremely expensive and have really restrictive monthly requests limits).

If you're are looking for a file templating solution with easy implementation, good support and fair prices, look no further. 100% recommend docxtemplater.

@ssured Sjoerd de Jong Owner - Racido BV

First thanks for this lib. Using docx as a template is an awesome smart thing to do, great you made this stuff!

Dwight Kelly President at Apago Inc

We needed a comprehensive templating engine for Microsoft Word, Excel and Powerpoint that allowed us to modify existing documents. Our requirements included updating styles for any element and replacing images & text placeholders. After testing all available commercial and open-source libraries we selected docxtemplater. The docxtemplater team has provided awesome support - answering our questions, fixing problems and continuously improving the product's capabilities. We couldn't ask for a better partner!

Martin Polasek CEO - Inventify

I can highly recommend docxtemplater as a library for generating documents from custom templates. It is easily extendible, very fast and easy to use. Edgar has been extremely helpful and always available to get the most of the library. One of the best support experience I have ever made!

Tom Newby CoFounder at ProcurePro

Docxtemplater is a fantastic product that solves a pretty technical problem. Edgar provides high quality support and has been able to resolve some tricky issues for us. Would recommend!

Tomas Theunissen Senior developer at MoreApp

We have been using docxtemplater to generate Word documents for quite a while and it has been a joy to use. Besides this awesome library, the support by the docxtemplater team is one of the best, replying to our question within the hour and even including a fix!

@cades hong-jen kao Full-stack Web Developer

Thanks for your time and effort, I really appreciate it :)

Anonymous Senior Frontend Developper - at 22-year old company

From a technolgy perspective the software is nice and lightweight, as it just needs to be brought in as a nodejs dependency. Most of the other solutions we looked at required loading a whole application stacking including base operating system, open office, plus bloated Java libraries, which I wasn't keen on.

Andrew Dravucz Senior Product Developer - Athennian

My team and I primarily work on building and maintaining document generation in Athennian. Thanks to all of docxtemplaters tools available, we are able to have document syntax thats easy to use for both internal and external users. Support has been very responsive and have been able to implement fixes within a day or two of bugs being reported. Would highly recommend docxtemplater for generating documents from templates!

Docxtemplater and especially the HTML module have helped us meet needs that other tools could not by providing a versatile and powerful solution for generating dynamic and customizable documents directly from templates, streamlining our document creation process and providing a seamless integration into our existing systems and workflows. Edgar provides an outstanding support, his tools are awesome.

Explore the demos Browse the docs
View pricing

Frequently asked questions

Is there a way to test the software or have a free trial ?

  1. If you're not sure if our product is right for you, we offer a two-week 100% money-back guarantee.
  2. We also have a live demo site with all modules enabled, so you can test out for example the HTML module and also upload your own templates.
  3. If you need more information, we can arrange a video call to show you what you need. Just send us an email.

What is the difference between plans and modules ?

Docxtemplater is an open-source project, which has basic features for templating. All paid features are available in modules, for example the HTML module allows inserting formatted text with bold, italic, links. All modules can be bought separately for a yearly fee. There are also three plans, the PRO plan, the ENTREPRISE plan and the PREMIUM plan that gives you access to a set of modules.

Does the license allow me to use the software in a SaaS product ?

Yes, the license model is suitable for Software as a Service businesses. As long as you are the entity running docxtemplater software, you can use the standard licenses.

If you need to redistribute the software by installing it on your customers servers, this will need a specific "appliance" license. The standard license does not allow to redistribute the software. The Appliance license plan is 4500€ per year for PRO and 10000€ per year for ENTREPRISE version. It allows you to distribute the modules contained in the PRO or ENTREPRISE module as part of your application. You are not allowed to resell the modules as is.

What kind of support will I get ?

For any purchase that you make (Plan or Module), you will get included support per email to answer all your questions. Usually, we respond in 24 hours, on business days. Bugfixes are also included in the support plan. For new features, it depends whether the feature makes sense for other customers and if the time required to implement it is not too long.

To have faster answers, please include the used modules, the template document, the generated document, or the expected output, your JSON data, and code relevant to the generation.

How will I get access to the modules ?

The modules are installed via npm, you'll have to run : npm install --save <secret-url> That url will be unique for your account.

The compiled files for browser usage are also bundled inside the package.

Can I convert the generated document to a PDF file ?

It is not possible to convert docx to PDF with docxtemplater, because docxtemplater is a templating engine and doesn’t know how to render a given document. We recommend to use libreoffice headless for a free tool or PDFTron for a paid alternative.

Read our commercial FAQ and technical FAQ or contact us for other questions.

Talk with sales Contact us