Generate a Word doc
Headings at three levels, bold and italic text, bullet lists and tables arrive as native Word elements in a genuine .docx that anyone can edit, search or read with a screen reader. Pay per use, no subscription, and a failed document is never charged.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
build DOCX from data
From stored content to a document people can edit
Much business content begins as information sitting somewhere else: a record in a customer system, a completed form, a row in a database. Turning it into something a person reads as a document usually means someone opens Word and formats it by hand, again and again. Here you describe the content once, with a title, headings, paragraphs, bullet lists and tables, and every document comes out laid out the same way, with real Word styles and real table cells. Because the result is a genuine .docx rather than a picture of one, the recipient can change a sentence, resize a column or run it through a screen reader.
Where it helps and what to watch
Typical uses are contracts filled from deal records, offer letters with the role and start date, policy documents with numbered sections and tables, and weekly reports that teams prefer to annotate offline. Keep headings in order, from the first level down, so the outline stays clear, and separate paragraphs with a blank line so each one stays distinct. If a document cannot be built, it is retried three times and then you get a clear explanation, with nothing charged.
The gap between data and a document
Most business content starts as data: a row in a database, a filled-out form, an object returned by another service. Turning that into something a human reads as a document — properly headed, spaced, tabled — usually means someone opens Word and formats it by hand, every single time.
Straightforward pricing, safe by default
A task that fails is never charged; we retry three times and, if the document still can't be built, you get a clear error explaining why. Your input data and the generated file are deleted after the retention window and never used to train anything.
What you can do with it
Contracts filled from CRM data
A sales platform generates a ready-to-sign contract .docx for each closed deal, populating clauses and terms straight from the CRM record.
Personalized offer letters
An HR system produces a properly formatted offer letter for every accepted candidate, pulling role, salary, and start date from the applicant record.
Policy documents from a compliance database
A compliance tool assembles a formatted policy document with numbered sections and tables directly from the rules stored in its database.
Reports compiled from analytics
An internal dashboard exports a weekly summary — headings, tables of figures, notes — as an editable Word document for teams that prefer to annotate offline.
FAQ
Is the output a real, editable .docx?
Yes. The service produces a genuine Word document with real styles, tables, and text — fully editable, searchable, and accessible — not an image or a flattened PDF renamed to .docx.
What happens if generation fails?
A failed task is never charged. We retry three times with backoff, and if the document still cannot be built you get a clear error instead of a silent failure or a charge.
How is this different from filling a Word template by hand?
There's no template to open or maintain in a desktop app.
How long can I access the generated file?
After the retention window it's deleted and never used for training.
Can I add a title to the generated Word document?
Yes. Give it an optional title and it appears as a first-level heading at the very top, above the headings, paragraphs and tables of your content.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/doc/generate-docx \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"content":"# Título\n\nUn párrafo con **negrita**.\n\n- una viñeta\n- otra viñeta\n\n| Producto | Precio |\n|---|---|\n| Café | 3 |"}'const res = await fetch("https://api.kit.forhosting.com/doc/generate-docx", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"content": "# Título\n\nUn párrafo con **negrita**.\n\n- una viñeta\n- otra viñeta\n\n| Producto | Precio |\n|---|---|\n| Café | 3 |"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/doc/generate-docx",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"content": "# Título\n\nUn párrafo con **negrita**.\n\n- una viñeta\n- otra viñeta\n\n| Producto | Precio |\n|---|---|\n| Café | 3 |"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/doc/generate-docx", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"content":"# Título\\n\\nUn párrafo con **negrita**.\\n\\n- una viñeta\\n- otra viñeta\\n\\n| Producto | Precio |\\n|---|---|\\n| Café | 3 |"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"content":"# Título\n\nUn párrafo con **negrita**.\n\n- una viñeta\n- otra viñeta\n\n| Producto | Precio |\n|---|---|\n| Café | 3 |"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/doc/generate-docx", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"content": "# Título\n\nUn párrafo con **negrita**.\n\n- una viñeta\n- otra viñeta\n\n| Producto | Precio |\n|---|---|\n| Café | 3 |"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "doc.generate_docx",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 25 |
max_pages | 200 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
The JSON to Word API turns structured data — headings, paragraphs, tables, lists — into a genuine .docx file, the kind Word opens and lets a person edit like they typed it themselves. It's for systems that hold the content but not the document: a form, a database record, a generated report that needs to leave your pipeline dressed as a real Word file.
The gap between data and a document
The generate word document api closes that gap: you describe the structure once in JSON, and every subsequent document is generated the same way, correctly, without a person touching a keyboard.
What structured input looks like
You send JSON describing the document's content and structure — sections, headings, paragraphs, tables, lists — and the service lays it out as a proper .docx: real Word styles, real tables with real cells, not an image pretending to be a document. That distinction matters because a genuine .docx stays editable, searchable, and accessible; the recipient can change a sentence, resize a column, or run it through a screen reader exactly as they would any Word file someone typed by hand.
How the generation runs
Generation happens asynchronously on our global edge, so a batch of a thousand documents doesn't block your application for a second of it. Call POST /doc/generate-docx with your structured payload and you receive a task_id immediately. When each file is ready, you're notified by a signed webhook — the natural choice when you're generating documents in volume — or by a signed link valid for 24 hours if a person just needs to grab one file.
Where it replaces manual formatting
This is built for the moment a document needs to exist because a process finished, not because someone decided to write it: a contract template filled from CRM data, a policy document assembled from a compliance database, a personalized offer letter generated per applicant, an internal report compiled from analytics output. Wherever the content is already structured somewhere in your system, this endpoint turns it into the document format the recipient actually expects, as one more automated step rather than a manual chore.
Straightforward pricing, safe by default
Generation is billed at a flat $0.002 per request — a single published rate, no tokens, no invented credits, no surprise line items. Access requires prepaid balance, which is what keeps the service fast and abuse-free — there is no free tier or trial, and requests without balance return a 402.
Technical questions
How do I generate a Word document with an API?
Send structured JSON describing headings, paragraphs, and tables to POST /doc/generate-docx and you get a task_id back. The generate word document api builds the .docx asynchronously and delivers it by signed webhook or a signed link valid for 24 hours.
Is this API free to use?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
What structure can I include: tables, lists, headings?
Yes to all three. You describe sections, headings, paragraphs, tables, and lists in JSON and they're laid out as native Word elements in the generated file.
Can I generate documents in bulk?
Yes. Because the endpoint is asynchronous and returns a task_id per request, you can fire many document generations in parallel from a queue or batch job without blocking.