| name | markitdown |
| description | CLI for converting files to Markdown using Microsoft's markitdown. Use when converting PDF, DOCX, PPTX, XLSX, HTML, images, audio, or other file formats to Markdown for text analysis or LLM processing. Triggered by requests involving file-to-markdown conversion, document text extraction, or preparing files for LLM input. |
| trigger-keywords | markitdown, convert to markdown, file to markdown, extract text, pdf to markdown, docx to markdown, pptx to markdown, xlsx to markdown |
| allowed-tools | Bash(markitdown:*) |
markitdown
Command-line tool for converting various file formats to Markdown. Built by Microsoft for LLM and text analysis pipelines.
Basic Usage
markitdown document.pdf
markitdown document.pdf -o output.md
cat document.pdf | markitdown
markitdown document.pdf > output.md
markitdown < document.pdf
Supported Formats
Converted without any extras: HTML, CSV, JSON, XML, plain text, ZIP (iterates contents), EPub, Jupyter notebooks (.ipynb), RSS feeds, Wikipedia URLs, Bing SERP results.
With extras installed: PDF, DOCX, PPTX, XLSX, XLS, Outlook MSG, images (EXIF metadata + optional LLM captioning), audio (EXIF metadata + optional transcription), YouTube URLs (transcript extraction).
Options
markitdown -v
markitdown -o FILE
markitdown -x .pdf
markitdown -m application/pdf
markitdown -c UTF-8
markitdown --keep-data-uris
Azure Document Intelligence
For higher-quality extraction using cloud OCR:
markitdown -d -e "https://your-endpoint.cognitiveservices.azure.com" document.pdf
Plugins
Third-party plugins extend format support via the markitdown.plugin entry point:
markitdown --list-plugins
markitdown -p document.xyz
Common Patterns
Convert a file and pipe to another tool
markitdown report.pdf | wc -w
markitdown report.pdf | head -50
Batch convert multiple files
for f in *.pdf; do markitdown "$f" -o "${f%.pdf}.md"; done
Convert from URL (via curl)
curl -sL "https://example.com/doc.pdf" | markitdown -x .pdf
Convert and process with stdin extension hint
When piping content, provide an extension hint so markitdown can select the right converter:
cat unknown_file | markitdown -x .docx