docxtemplater alternative
docxtemplater is the default answer to "how do I fill a Word template from JavaScript", and for a lot of projects it is the correct answer. It is also the comparison most often made unfairly, in both directions — people call it free when the part they need is not, and vendors call it limited without saying which limits are lifted by a licence. So: every price and capability below was read off docxtemplater.com/pricing on 29 August 2026. This page is written by the people who build DocMint. The section on when to use docxtemplater instead of us is not a formality.
The short version
docxtemplater is a library you run; DocMint is an API you call. The interesting difference is not
that one is a library — it is where the line between free and paid falls. docxtemplater's
core is genuinely free and MIT/GPLv3 dual-licensed, and it covers {tag} replacement,
conditions, loops and custom delimiters. Excel templating, PowerPoint slide control, images, HTML
and knowing where a tag failed are separate commercial modules.
What the free version actually does
From their pricing page, the Open source tier lists exactly this: {tag} replacement,
conditions, loops, change delimiters, community support, MIT License. That is a real and useful
feature set, and for a Word-only invoice with a repeating table it may be all you ever need.
What it does not include, because each is a separately-sold module: the Xlsx Module
("Template Excel files using Docxtemplater, using {tag}, {#loops}"), the
Slides Module ("Conditionally add or remove slides. Repeat a slide multiple times"), the
Image Module, the Html Module, the Table Module, the Chart Module and
the Error-location Module.
The module prices, read today
| Tier | Price | What you get |
|---|---|---|
| Open source | Free | Core only. MIT or GPLv3, dual licensed. Community support on GitHub. |
| One module | €500 / year | One module of your choice. Email support, 48 h average. |
| PRO | €1,250 / year | Four modules of your choice. |
| ENTERPRISE | €3,000 / year | All modules, plus a preconfigured Docker image exposing an HTTP API. |
| Premium | €9,000 / year | All modules, full browser build, 4 days of expert time, monthly call. |
A note on a small inconsistency, since we are quoting them: the ENTERPRISE card says "Access to all 18 modules" while the comparison table below it says "All 19 modules". We do not know which is current, and it does not change the arithmetic.
That arithmetic is the honest headline of this page. If your requirement is Word and Excel and PowerPoint, with images — which is what a finance team's template folder actually looks like — you are at four modules, which is the PRO tier at €1,250 a year. Add error locations, because you will want them, and you are shopping at ENTERPRISE. DocMint's Pro plan is $29 a month and includes all three formats, images, PDF output and the error locations, because there is no feature ladder — every plan has every feature we have.
The comparison is not like-for-like, and pretending otherwise would be dishonest. A docxtemplater licence is perpetual-ish in feel and has no per-document meter: render ten million documents on your own hardware and the price does not move. DocMint meters. Above roughly a million documents a year the licence is the cheaper shape, and at that volume you should buy it.
The literal word undefined
docxtemplater's documented default for a tag whose data is missing is to render the string
undefined into the document. It is configurable — nullGetter exists
precisely for this — but it is what you get if you do not know to change it, and a document that
says undefined where the customer's name goes is worse than no document, because
nothing fails and nobody notices until it has been sent.
DocMint's default is the other way round: a placeholder with nothing behind it is HTTP 422, no document, no credit charged. Measured live on 29 August 2026:
{ "error": {
"code": "placeholder_unresolved",
"message": "The template uses {price|currency} but the data has no \"price\".",
"hint": "Add \"price\" to the data, or write {price|default:} to allow it to be absent.",
"details": { "field": "price",
"location": "word/document.xml, paragraph 2",
"available": ["invoice_no","customer","items","description","qty"] } } }"No credit charged" is a measurement, not a promise: eight deliberately-failed renders while this
page was written, and GET /v1/usage reported credits: 0 against all of
them, with used unchanged at 7 before and after the last one.
Where the tag failed is a paid module
This is the single comparison that decided the shape of DocMint. docxtemplater sells the Error-location Module — "Show template errors as comments in the Word/PowerPoint document" — as one of the modules, so on the Open source tier a broken template is a stack trace without a place. At €500 a year for one module, finding out where a template broke is a line item.
In DocMint every failure carries the location by construction, and asking a template what it needs is a free endpoint that produces no document:
POST /v1/inspect HTTP 200, 0 credits
{ "fields": [
{ "name": "items", "scope": "", "type": "array", "repeating": true,
"formatters": ["sumProduct","currency"],
"locations": ["word/document.xml, paragraph 2",
"word/document.xml, paragraph 4"] },
{ "name": "price", "scope": "items", "type": "number",
"required": true, "inferred": true } ],
"sample_data": { … a skeleton you can POST straight back … } }There is a second failure DocMint reports that we have not seen reported anywhere else. Inside
{#items}, a tag may legitimately reach outwards to the document root — {currency}
is a reasonable thing to write. But if your rows have product_name and you write
{name}, and name happens to exist at the root, every row silently prints
the same value. Nothing errors. The document looks plausible. docxtemplater's own documentation
presents {#products}{name}{/products}, with name at the root, as normal
behaviour. DocMint allows it too, but reports every occurrence in the render response with the field
name and location, and strictScope: true turns the warning into a 422.
When running it yourself is right
Do not call an API for this if one of these is true:
- The document must never leave your network. Payroll, medical records, anything where the data protection question is settled by the data not moving. A library in your own process wins that argument outright; no amount of DPA text beats it.
- You are already in Node and the core covers you. Word only, no images, no Excel, and you
are happy setting
nullGetteryourself: docxtemplater's free tier does that well and costs nothing. Adding a network hop and a vendor for it would be silly. - Volume above roughly a million documents a year. A flat annual licence beats any per-document meter at that point, including ours.
- You need it offline, in the browser, or embedded in a desktop app. The Premium tier ships a full browser build. We are an HTTPS endpoint and nothing else.
- You want charts driven from your JSON. Their Chart Module does it. We have no charts and none planned.
What you take on when you self-host: LibreOffice for the PDF step (a process, a memory footprint
and a queue — measured on our instance at 1,346 ms and about 219 MB peak), Word's habit of splitting
{{na + me}} across runs the moment somebody edits the middle of a word, formula ranges
in spreadsheets that must be widened when a loop adds rows, and content types that change when a
macro-enabled file is rewritten. None of it is impossible. All of it is a fortnight you did not plan
for.
What we cannot claim
- No paying customer from outside our own circle yet. docxtemplater's page says "Trusted by 800+ companies". We have nothing comparable and will not invent one.
- Our free tier is 30 documents a month. docxtemplater's free tier is unlimited documents, because it is a library. On the free-versus-free comparison we lose, and it is not close.
- Our formatter library is 43 entries. Broader tools have more.
- One region, one instance, no SLA, no SOC 2. Frankfurt, a single small instance that restarts on every deploy. If an hour of downtime would damage your business, this is not yet the right dependency.
- No charts, no HTML-into-Word, no rich text, no footnotes, no subtemplates, no delivery integrations, no web dashboard. The full list is on the home page under "What DocMint does not do yet".
Moving a template across
A docxtemplater template is usually a DocMint template already. Both use {tag}, both
use {#section}…{/section}, and DocMint additionally accepts {{tag}}
everywhere so a mustache-style or n8n-style template also renders unchanged. No third syntax was
invented. What changes is the call:
# Upload once, render by name — or skip storage and send template_base64 per request.
curl -X POST https://docmint.app.mintapis.com/v1/render \
-H "Authorization: Bearer dm_live_xxx" \
-H "Content-Type: application/json" \
-d '{"template":"invoice",
"data":{"invoice_no":"2026-0042","customer":"Acme GmbH",
"items":[{"description":"Widget","qty":3,"price":12.5}]},
"output":"pdf"}' \
--output invoice.pdfMeasured on this template on 29 August 2026: five consecutive .docx renders at
10 ms server-side (54–74 ms round trip from Germany), the PDF variant at 1,346 ms server-side.
A key is one POST /v1/signup away, no card. The API reference has
every error code; the n8n page covers the workflow route.