You are currently offline, serving cached version

Powerful Word, Powerpoint and Excel generation

Want to generate docx, pptx or xlsx from inside your application ? By using docxtemplater and its paid modules, you will be able to customize your generated document using Word, Powerpoint and Excel itself, with a simple {tag} syntax.

Created by potrace 1.16, written by Peter Selinger 2001-2019

Easy to use

You don't need technical skills to edit a Word template, so it is ideal for your clients to customize their template.

Very robust

For each feature, we write a full suite of tests with real Word documents to ensure that the generated documents are correct.

Support included

If you buy a license for docxtemplater pro, you get support per email to help you for any problems you may have.

Why use docxtemplater?

Easy to install and maintain

In a few minutes you can install docxtemplater, create your first template and generate some docx from javascript objects or JSON. Creating or modifying a template will not require you to ask a developper to do it.

Works everywhere

docxtemplater is tested with all active node.js versions 10 up to version 14, and in modern browsers (Chrome,Firefox,Safari,IE9+).

Full Documentation

docxtemplater has extensive documentation to get started, and configure the generation.. For questions about our pro version, see our commercial FAQ and our technical FAQ for more information.

Features many different types of tags

With docxtemplater, you can insert text, but also have loops and conditions : `{#user.age > 18}User is allowed{/}`, the possibility to add images with : `{%image}`, to add HTML formatted text with `{~html}`, or to include subtemplates

Open for extension

docxtemplater is open for extension with its module system. You can also define a custom parser to process the tags the way you want.

Fully tested

docxtemplater has automated tests that are run regularly and at each git push, covering a huge amount of possible inputs and verifying that the output is correct.

Pricing

HTML

400€
per
year
Insert formatted text to your Word document using a single tag
Use a WYSIWYG editor such as CKEditor and include the formatted text into the docx
Transform HTML lists, <ul>, <ol> and <li> elements
Transform HTML <table>

Image

350€
per
year
Include an image by using the tag {%image}
Load images synchronously or asynchronously
Use base64 image, from the file system, URL, or other methods
Include block images or inline images
Configure the size of the image

Excel

400€
per
year
Use docxtemplater on Excel documents (xlsx)
Create multiple rows by using loops
Replace {tag} by strings, numbers, currencies or custom formats

Slides

350€
per
year
Conditionally remove a slide based on a condition
Repeat a given slide for each item in an array
Programmatically rearrange a presentation using the template slides

Chart

400€
per
year
Use the {$chart} tag just after a chart, and let the data be filled in from your JSON

Table

400€
per
year
Insert a table from two-dimensional data
Loop over table-columns (create one column for each item in an array)
Generate a grid-layout on docx documents
Together with the slides-module, loop over elements and place a max amount of elements on a given slide
With the tag {:merge-cells-col 1}, Merge all adjacent cells that are identical on the first row

Error Location

400€
per
year
When a template error happens, highlight the errors in the template using word comments
Show plain-english explanation of the error right in the document
Highlight all errors in the document
Highlight position of the error

Subtemplate

350€
per
year
Include another word document with a single tag
Choose whether to render the included document (replace tags) or not
Together with the subsection module, can include headers/footers

Pptx-Subtemplate

350€
per
year
Include another powerpoint document with a single tag
Choose whether to render the included document (replace tags) or not

Subsection

400€
per
year
Replace current section or Add a new section from an other document
The headers/footers of the replaced section are copied

QrCode

350€
per
year
Replace a qrcode image by an image using base64, filesystem, URL, or other method
Keeps size and all effects applied to original image

Word run

300€
per
year
Insert XML at the run level. Works like RawXML syntax
Insert bold, italic, or any other styled text.

Meta

150€
per
year
Make a document readonly
Add a text watermark
Update the margins

Styling

350€
per
year
Restyle a table cell, a paragraph or a table row
Style a cell based on conditions

HTML-Pptx

400€
per
year
Insert formatted text to your document using a single tag
Transform HTML lists, <ul>, <ol> and <li> elements
Transform HTML links, titles <h1> to <h6>

Paragraph-placeholder

300€
per
year
Add the tag {?name}, and if the value is falsy, the whole paragraph will be dropped

Footnotes

300€
per
year
Add a footnote using the tag {:footnote note}
Footnotes can use raw XML if you need to have italic, bold, ...

Open source

Free
{tag} replacement
Conditions
Loops
Change delimiters
Community Support

Pro

950€
per
year
Buy
Everything from Open-source, plus :
Email support, typical response time in less than 24 hours
Formatted text (HTML + CSS), for Word files
Insert images with the {%image} tag
Repeat or remove slides conditionally on Powerpoint files
Import the content of another Word file (without headers and footers)
Add formatted runs of text with XML (for bold, italic, colors)
Insert footnotes
Access to a total of 6 modules

Entreprise

2450€
per
year
Buy
Everything from Pro, plus :
Email support, typical response time in less than 24 hours
Formatted text (HTML + CSS), for Powerpoint files
Import the content of another Word file (with headers and footers)
Import the content of another Powerpoint file
With a single {?tag}, keep or drop the paragraph containing that tag, avoiding to have to open and close loops around the paragraph
Template Excel files (xlsx)
Locate errors in your templates with comments
Replace a QRCode image by another image
Restyle a table cell, table row or paragraph conditionally
Insert tables from two-dimensional arrays of data
Make documents readonly
Add text watermarks
Update margins
Replace chart data
Access to a preconfigured docker image that allows you to generate documents from a simple HTTP API
Access to a total of 17 modules

Frequently asked questions

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

We do not provide a free trial period, but we do have two week 100% money back guarantee. We also provide a live demo site which has multiple modules enabled, for example, you have a demo specific for the HTML module. On the demo site, you can also upload your own templates, which makes it quite good to see if it would work well for your usecase. If something is missing on the demo site, we can show it to you on a video call a time that works for both of us (contact us per email).

What is the difference between plans and modules ?

Docxtemplater is an open-source project, which has basic features for templating. All paid features come in forms of modules, for example the HTML module allows to insert formatted text with bold, italic, links. All modules can be bought separately for a yearly fee. There are also two plans, the PRO plan and the ENTREPRISE 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 the software 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 will receive a secret, unique url with wich you can do so you will do : npm install --save <secret-url>.

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 for other questions.

Trusted and used by more than 20,000 developpers

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.

Erik Kramer

Founder and CEO at Cloud++ B.V

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

@cades hong-jen kao

Full-stack Web Developer

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

@ssured Sjoerd de Jong

Owner - Racido BV

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!

Martin Polasek

CEO - Inventify

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 use cases 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!

Anonymous

Senior Software Engineer, NY-based Web Application Development Company

Once again: This is an awesome module!

Allan Ebdrup

CTO at Debitoor

I'm the creator of docxtemplater. I work on making docxtemplater great since 2013.