Get plain text from Word
Sometimes a Word document is just a container for words, and every layer of formatting around them is noise a machine has to fight through. This endpoint pulls the raw text out of a .docx — no styles, no XML, no embedded objects — leaving exactly what a search index, a language model or a diff tool actually needs.
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.
Why raw text still matters
A .docx file is a zipped bundle of XML — styles, revision history, embedded media, theme data — wrapped around the words you actually typed. That's useful for editing, but it's dead weight for a system that only needs the words: a search index doesn't care about your heading styles, a text-similarity check doesn't care about your track-changes history, a keyword extractor just wants sentences. This endpoint discards all of it and keeps only the text.
Who strips a document down to text
Search and indexing pipelines that need plain content to tokenize, compliance tools scanning documents for specific terms or patterns, data teams feeding document text into analysis or classification, engineers diffing two versions of a contract to see what actually changed in the wording rather than the formatting. Anywhere the downstream consumer is code rather than a person reading in Word, plain text is the right shape.
What you get back
Submit the .docx, get a task_id immediately, and the job returns the document's text content in reading order — paragraphs, list items and table cell text included as plain lines, with formatting, styles and embedded objects stripped out entirely, ready to feed straight into another process.
How it fits an automated pipeline
Because it's async and billed flat per document rather than per page, it's a predictable, cheap first step: a document-ingestion pipeline receives a .docx upload, converts it to text before anything else happens, and only then routes that text into search indexing, classification or a language model — with the webhook marking the moment it's safe to move to the next stage.
A note on the format being stripped
DOCX has carried far more than text since Microsoft introduced the XML-based Office Open XML format in 2007 — it can hold comments, tracked changes, embedded spreadsheets, custom fonts. Plain text, by contrast, is closer to the original idea of what a word processor stored back in the 1970s and 80s: characters, nothing else. This endpoint is, in a sense, a trip back to that simplicity on purpose.
What you can do with it
Search index ingestion
A document management system converts every uploaded .docx to plain text before tokenizing it for full-text search.
Contract wording comparison
Legal ops extracts the text of two contract versions to diff the actual wording, ignoring formatting noise.
Compliance keyword scanning
A compliance tool converts submitted documents to text to scan for restricted terms or required disclosures.
Feeding a language model
An automation pipeline strips uploaded Word files to text before passing the content into a summarization or classification step.
FAQ
Is the DOCX to Text API ready?
It's in deployment and will be available shortly; the endpoint and price described here are final.
How is it priced?
$0.052 per request plus $0.003 per document — a flat rate rather than a per-page charge, since the output is plain text regardless of length.
Does it keep any formatting?
No, by design. Styles, fonts, headings and embedded objects are stripped; only the text content remains, in reading order.
What about tables and lists?
Table cell text and list items are included as plain lines of text; the visual grid or bullet structure itself is not preserved.
Is there a free trial?
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.
How do I get the extracted text?
By signed webhook when the job finishes, or from a signed link valid for 24 hours.
Am I billed if extraction fails?
No. A failed task is retried automatically up to three times and never charged; you get a clear error instead.
Can I process many Word files at once?
Yes, each request handles one document and returns its own task_id, so processing many files is just parallel requests collected by webhook.
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, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/doc/docx-to-text \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"input":"…"}'const res = await fetch("https://api.kit.forhosting.com/doc/docx-to-text", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"input": "…"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/doc/docx-to-text",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"input": "…"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/doc/docx-to-text", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"input":"…"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"input":"…"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/doc/docx-to-text", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"input": "…"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "doc.docx_to_text",
"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. |