Preparing Word Documents for an LLM Knowledge Base
Most internal knowledge lives in Word files. Getting it into a form a model can use is mostly a document-hygiene problem, not a technical one.
LLM workflows · · 3 min read
Why .docx is a poor direct input
A .docx is a ZIP archive of XML. Inside, your document is a sequence of paragraphs, each tagged with a style, plus runs of text carrying formatting, plus relationship files describing images and links. None of that is something a language model can read directly.
It also mixes meaning and appearance freely. The same visual result — a bold 16pt line — can be a genuine Heading 1 style or a body paragraph someone formatted by hand. Word does not care about the difference. Every downstream tool does.
Converting to Markdown resolves this by forcing the distinction: only real structure survives the translation, so what comes out is exactly the meaning the document actually encoded rather than the meaning it appeared to have.
What converts and what disappears
Survives: heading levels one through six, bullet and numbered lists including nesting, bold, italic, strikethrough, hyperlinks, blockquotes and simple tables. That is the semantic content of most business documents.
Does not survive, because Markdown cannot express it: fonts, colours, sizes, alignment, page breaks, columns, headers and footers, text boxes, comments and tracked changes. If meaning in your documents lives in any of these, it lives in the layout and it will not make the trip.
The one to check deliberately is text boxes. They are common in templates and diagrams, and their contents sit outside the main document flow — so a fact that appears prominently on the page can be entirely absent from the conversion, with nothing to signal that it was dropped.
The habit that decides everything: real heading styles
The single largest quality determinant is whether authors used Word's heading styles or formatted headings by hand. Hand-formatted headings carry no semantic tag, so they convert to bold body text, the document arrives as one flat block, and every structure-aware technique downstream stops working.
This is worth fixing at the source rather than patching afterwards. Word's navigation pane shows the document outline — if it is empty or wrong, the headings are not real. Applying proper styles takes minutes per document and improves the Word file for its own readers at the same time.
For a corpus you did not write and cannot revise, the fallback is to convert anyway and inspect. Our DOCX to Markdown converter shows the result immediately, so a quick scan tells you whether a document has usable structure before you invest in processing it.
A workflow for a folder of documents
Convert a representative sample first — a dozen files spanning your document types — and read the Markdown. You are checking three things: did headings survive, did tables survive, and is anything conspicuously missing.
Fix what the sample reveals. Usually that means applying heading styles to a subset of templates, and deciding what to do about tables and text boxes. Doing this before bulk processing is far cheaper than discovering it after indexing.
Then convert the rest and chunk on the heading structure, as described in chunking PDFs for RAG — the technique is identical once you have Markdown, regardless of whether the source was PDF or Word.
Keep the original files. Markdown is your processing format, not your archive. When a conversion decision turns out wrong, you want to redo it from the source rather than from a lossy intermediate.
Handling the confidentiality problem
Internal knowledge bases are built from exactly the documents an organisation cannot upload: HR policies, contracts, incident reports, strategy decks. That rules out most conversion services before the technical merits are even discussed.
Every converter on this site runs in the browser. The .docx is unzipped and converted on your machine, and no part of it is transmitted. You can disconnect from the network and convert anyway — which is a far stronger assurance than a privacy policy, because it is one you can test yourself in under a minute.
For mixed corpora, the same applies to PDF to Markdown and PDF to JSON, so a pipeline spanning Word and PDF sources needs no upload at any stage.