DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to turn Word, Excel and PDF files into Markdown for an LLM with Markitdown

Install MarkItDown and convert a folder of documents into token-efficient Markdown an LLM can read.

Short answer: Create a virtual environment with python -m venv .venv and activate it with source .venv/bin/activate; then 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. All steps.

  • Top pick
  • Research
  • Beginner
  • 15 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor

untrusted-input. MarkItDown performs I/O with the privileges of the current process, so sanitize inputs before converting files or URLs you do not trust.

Who it is forAn analyst who wants to paste reports, spreadsheets and slide decks into a chat model without losing tables and headings.

The problemCopying text out of PDFs and office files loses the structure, and raw files are not something most LLM pipelines accept.

The outcomeMarkdown files that keep headings, lists, tables and links, ready to drop into a prompt or an indexing pipeline.

What you need first

  • 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

Steps

  1. Create a virtual environment with python -m venv .venv and activate it with source .venv/bin/activate
  2. Install everything with pip install 'markitdown[all]', or only the formats you need with pip install 'markitdown[pdf, docx, pptx]'
  3. Convert one file with markitdown path-to-file.pdf -o document.md
  4. Or pipe content in with cat path-to-file.pdf | markitdown
  5. From Python, call md.convert("test.xlsx") on a MarkItDown(enable_plugins=False) object and read result.markdown

Prompt for your agent

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.

Caveat. The built-in converters are offline and format specific; scanned PDFs need the OCR plugin or an Azure service for good text.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for microsoft/markitdown and "Turn Word, Excel and PDF files into Markdown for an LLM"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer