Word to Markdown

Turn a .docx file into clean Markdown that keeps its real structure - Heading 1 becomes #, Heading 2 becomes ##, bullets stay nested, tables stay tables. It runs entirely in your browser, and it shows you exactly how many AI tokens the Markdown saves before you paste it anywhere.

Drag & drop a .docx file, or click to browse

Headings, lists, tables, links, bold and italic all survive. Your document is converted inside your browser and never uploaded.

Why convert Word to Markdown for an LLM at all?

A .docx is a ZIP full of XML. Every run of text in it is wrapped in styling markup, so the moment you push a Word document through a generic extractor you get either a wall of structureless text or a mountain of HTML-ish formatting noise. Both are bad for a chatbot: the first throws away the outline the model needs to reason about the document, and the second spends your context window on markup instead of content.

Markdown sits exactly in the middle. Its syntax is a handful of characters that every model has seen millions of times during training, so headings, lists and tables survive intact while costing almost nothing to encode. That is why word to markdown for llm workflows have become standard practice for anyone pasting long documents into Claude, ChatGPT, Gemini, DeepSeek or Grok - and why this tool shows you the token comparison instead of asking you to take it on faith.

What this converter actually preserves

  • Heading levels, taken from Word's own style hierarchy - Heading 1 to Heading 6 map to # through ######, and Word's Title and Subtitle styles are folded in too.
  • Nested lists, bulleted and numbered, indented by the width of the parent marker so every Markdown parser reads sub-bullets as children rather than siblings.
  • Tables, as GitHub-flavoured Markdown tables. Pipes and line breaks inside a cell are escaped, horizontally merged cells are expanded, and every row is padded so the table is always valid.
  • Bold, italic, bold-italic, strikethrough and inline code, plus hyperlinks as [text](url).
  • Images, extracted as real image files and referenced by filename, bundled with the .md in a ZIP.
  • Block quotes, from Word's Quote and Intense Quote styles.

Anything Word can store that Markdown genuinely cannot express - text boxes, tracked changes, review comments, embedded OLE objects, equations, headers and footers - is called out in a warning panel above the result. Nothing is dropped silently.

Questions fréquentes

Why does Markdown use fewer tokens than the Word document's text?

A .docx stores text inside layers of XML styling. Any straightforward conversion of it produces HTML or HTML-like output where a single bolded sentence can cost several times its own length in markup. Markdown replaces all of that with one or two characters - # for a heading, - for a bullet, ** for bold - which tokenizers encode very cheaply. The tool shows the estimated before-and-after counts for your specific file, so you can see the difference rather than guess at it. Counts are an estimate of roughly four characters per token, not a specific model's tokenizer.

Is my document uploaded to a server?

No. The .docx is read and converted entirely in your browser using mammoth, and the images are extracted in memory. Nothing is sent anywhere, which also means the tool works on confidential contracts, HR documents and internal reports without a data-handling conversation.

What happens to images in my Word document?

Markdown is a plain-text format, so it can only ever reference an image by filename - it cannot embed one. This tool pulls every embedded image out as its own file (image1.png, image2.jpg, and so on), writes matching ![alt](image1.png) references into the Markdown, and gives you a ZIP containing the .md plus all the images. If the document has no images, you get a single .md file instead.

Does it keep heading levels exactly as Word had them?

Yes. Heading levels come from the paragraph styles in the document, not from font size guesswork, so Heading 1 becomes #, Heading 2 becomes ##, and so on down to Heading 6. Word's Title and Subtitle styles are mapped to # and ## as well, because that is how they read in a document outline.

Can it open .doc files from Word 97-2003?

No, only the modern .docx format. The old .doc format is a binary container that cannot be read in a browser. Open the file in Word, LibreOffice or Google Docs and save it as .docx first - the tool tells you this instead of failing silently if you drop a .doc on it.

What about tracked changes and comments?

Tracked insertions are kept and tracked deletions are dropped, which is the same result as accepting every change. Review comments live outside the document body and are not converted. Both cases are listed in the warnings panel so you know before you paste the result into a chatbot.

How do I use the result with ChatGPT, Claude or Gemini?

Click Copy Markdown and paste it straight into the chat. Because the structure survives, you can then ask things like "summarise section 3" or "turn the table under Pricing into a bullet list" and the model knows exactly what you are pointing at - which is not true of a flat text dump.

Are tables really converted, or flattened into text?

Really converted. Each Word table becomes a GitHub-flavoured Markdown table with a header row and an alignment row. Cell contents that would break the syntax - a pipe character, or a line break inside a cell - are escaped rather than left to corrupt the row, and merged cells are expanded so the columns stay aligned.

Outils similaires