markitdown

Convert PDF, DOCX, PPTX, XLSX, images, audio, and web content into Markdown text.

Updated Oct 7, 2022
One-click install
npx skills add https://github.com/tamagusko/linux-cfg --skill markitdown-tamagusko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: markitdown
Source: https://github.com/tamagusko/linux-cfg/tree/main/dotfiles/claude/skills/markitdown
Command: npx skills add https://github.com/tamagusko/linux-cfg --skill markitdown-tamagusko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires markitdown, openai, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Documents in formats like PDF, Word, PowerPoint, and Excel are difficult for LLMs and text pipelines to consume directly. This Skill converts them into clean, token-efficient Markdown so content can be analyzed, indexed, or fed into AI workflows. ## Core Features & Use Cases - Multi-Format Conversion: Convert PDF, DOCX, PPTX, XLSX, HTML, CSV, JSON, XML, ZIP, EPUB, images (with OCR), audio (with transcription), and YouTube URLs to Markdown. - AI-Enhanced Image Descriptions: Use vision models via OpenRouter to generate detailed descriptions of figures and slides during conversion. - Batch and Literature Workflows: Included scripts batch-convert directories in parallel and convert scientific paper collections with metadata extraction and index generation. - Use Case: Convert a folder of research paper PDFs into Markdown files with YAML front matter, organized by year, plus an INDEX.md catalog for a literature review. ## Quick Start Convert the attached document 'paper.pdf' to Markdown and save the result as paper.md.

Frequently Asked Questions about markitdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a PDF to Markdown in Python?

Create a MarkItDown instance and call md.convert("document.pdf"), then read result.text_content for the Markdown output. Install PDF support first with pip install 'markitdown[pdf]'.

What file formats does MarkItDown support?

MarkItDown supports PDF, DOCX, PPTX, XLSX, images (JPEG, PNG, GIF, WebP), audio (WAV, MP3), HTML, CSV, JSON, XML, ZIP archives, EPUB, Outlook messages, and YouTube URLs. Each format may require an optional dependency group such as 'markitdown[pdf]' or 'markitdown[audio-transcription]'.

How do I convert multiple documents to Markdown at once?

Use the included batch_convert.py script with an input and output directory, optionally filtering by extensions and enabling parallel workers. It converts files concurrently with a ThreadPoolExecutor and prints a success summary.

Can MarkItDown describe images and slides with AI?

Yes, pass an OpenAI-compatible client (such as OpenRouter) with llm_model and llm_prompt to the MarkItDown constructor. Image content in PPTX and image files then receives AI-generated descriptions during conversion.

Why does MarkItDown conversion fail with a stream error?

convert_stream requires a binary file-like object opened in "rb" mode, plus an explicit file_extension argument. Opening the file in text mode or omitting the extension causes conversion errors.

Does MarkItDown work with scanned PDFs?

Scanned PDFs need OCR support, which requires installing Tesseract on the system. For complex layouts, you can also pass an Azure Document Intelligence endpoint to the MarkItDown constructor for enhanced extraction.