> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doconda.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Doconda vs docx (docx.js)

> docx is a free JavaScript library for generating Word files in code; Doconda is an API that creates, reviews and edits Word, Excel, PowerPoint and PDF.

**Use docx (docx.js)** if you want to generate Word files from JavaScript or TypeScript with a declarative API, for free
and even in the browser. **Use Doconda** if you want to ask for the finished document with its PDF, also work with
Excel, PowerPoint and PDF, or change existing files with an instruction instead of placeholders.

## Comparison

| | docx (docx.js) | Doconda |
| - | - | - |
| What it is | JavaScript/TypeScript library for generating and modifying .docx files | API (with TypeScript and Python SDKs and an MCP server) that creates, reviews and edits documents |
| Create | You describe paragraphs, tables, images, headers and footers in code; it can also convert HTML | From a sentence (`prompt`) or your Markdown (`content`), with the style described in plain text |
| Edit existing files | Yes, with the *patcher*: fills `{{...}}` placeholders in an existing document | Yes: you describe the change and the rest stays the same; no placeholders needed |
| Review and repair | Not its goal | [Review](/en/guides/review) returns the same file fixed plus a report |
| PDF | Does not produce PDF | Every Word file comes with its PDF |
| Formats | .docx only | Word, PowerPoint, Excel and PDF |
| Templates needed | Not to create; the patcher needs a document with placeholders | No; you can pass a file to copy its design |
| Use from an AI agent | You have to wrap it in a tool yourself | Ready-made function-calling tools (`doconda.tools()`) and an [MCP server](/en/agents/mcp) |
| Hosting | Runs in Node or the browser, no external server | Hosted service; documents stored in the EU (Ireland) |
| License and price | MIT, free | Pay per delivered document from a prepaid balance; €5 free to start |

## When to choose docx

* You want a free, open source dependency with no accounts or API keys.
* You need to generate the Word file in the user's browser, without a server.
* Your document has a known structure and you prefer to describe every element in code.
* You already have templates with `{{placeholders}}` and only need to fill them.

## When to choose Doconda

* You want the finished document from text or a sentence, without maintaining layout code.
* You need the PDF, or Excel, PowerPoint and PDF too.
* You have to [edit](/en/guides/edit) files you did not prepare (no placeholders), for example "change the signing date
  and add a clause", and have new content follow the document's formatting.
* You want to [review](/en/guides/review) files and get a report of what was fixed and what was not.
* An AI agent uses it: the [TypeScript SDK](/en/sdk/introduction) ships the tools ready for function calling.

## Using them together

docx fits fixed documents generated in the browser; Doconda fits documents that change with what the user asks for. You
can also generate a Word file with docx and send it to Doconda to [review it](/en/guides/review) and get its PDF. Both
install from npm (`npm install docx`, `npm install @doconda/sdk`).

## Sources

* docx on GitHub (MIT license, Node and browser): [https://github.com/dolanmiu/docx](https://github.com/dolanmiu/docx)
* Patcher documentation: [https://github.com/dolanmiu/docx/blob/master/docs/usage/patcher.md](https://github.com/dolanmiu/docx/blob/master/docs/usage/patcher.md)
* Official documentation: [https://docx.js.org/](https://docx.js.org/)
* Doconda: [Create](/en/guides/create), [Edit](/en/guides/edit), [Review](/en/guides/review), [Pricing](/en/guides/account#pricing), [TypeScript SDK](/en/sdk/introduction), [MCP server](/en/agents/mcp)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.