{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "microsoft-markitdown--convert-office-files-to-markdown-for-an-llm",
 "repo": "microsoft/markitdown",
 "repo_url": "https://github.com/microsoft/markitdown",
 "repo_slug": "microsoft-markitdown",
 "title": "Turn Word, Excel and PDF files into Markdown for an LLM",
 "page_title": "How to turn Word, Excel and PDF files into Markdown for an LLM with Markitdown",
 "summary": "Install MarkItDown and convert a folder of documents into token-efficient Markdown an LLM can read.",
 "who": "An analyst who wants to paste reports, spreadsheets and slide decks into a chat model without losing tables and headings.",
 "problem": "Copying text out of PDFs and office files loses the structure, and raw files are not something most LLM pipelines accept.",
 "outcome": "Markdown files that keep headings, lists, tables and links, ready to drop into a prompt or an indexing pipeline.",
 "steps": [
  "Create a virtual environment with `python -m venv .venv` and activate it with `source .venv/bin/activate`",
  "Install everything with `pip install 'markitdown[all]'`, or only the formats you need with `pip install 'markitdown[pdf, docx, pptx]'`",
  "Convert one file with `markitdown path-to-file.pdf -o document.md`",
  "Or pipe content in with `cat path-to-file.pdf | markitdown`",
  "From Python, call `md.convert(\"test.xlsx\")` on a `MarkItDown(enable_plugins=False)` object and read `result.markdown`"
 ],
 "agent_prompt": "Install microsoft/markitdown with `pip install 'markitdown[all]'` and convert every file in <folder> to Markdown with `markitdown <file> -o <name>.md`. Put the results in <output folder> and list any file that failed to convert and why.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "The built-in converters are offline and format specific; scanned PDFs need the OCR plugin or an Azure service for good text.",
 "category": "Research",
 "tags": [
  "Research"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.10 through 3.14, ideally in a virtual environment",
  "Optional dependency groups for each format, or [all] for everything",
  "Optional: an OpenAI-compatible client for image descriptions and the markitdown-ocr plugin",
  "Optional: an Azure Document Intelligence or Content Understanding resource, which is billed per call"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "untrusted-input",
   "notice": "MarkItDown performs I/O with the privileges of the current process, so sanitize inputs before converting files or URLs you do not trust."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/microsoft-markitdown/convert-office-files-to-markdown-for-an-llm/",
 "md": "https://dedupedai.com/use-cases/microsoft-markitdown/convert-office-files-to-markdown-for-an-llm/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/microsoft-markitdown--convert-office-files-to-markdown-for-an-llm.json",
 "api_version": "v1"
}
