Your LLM can turn a PDF into Markdown for you, but it spends tokens doing it and you get little say in the result. In this video, you’ll do the conversion yourself in Python with Microsoft’s MarkItDown library and get documents your LLM can read cheaply and reliably.
Negar Vahid starts with why LLMs love Markdown: it keeps headings, lists, and tables while using far fewer tokens than HTML or XML. Then you’ll install MarkItDown, verify the setup, and convert an Excel spreadsheet into a clean Markdown table in four lines of code.
The video wraps up with a challenge: batch-convert a folder of PDFs, Word files, and spreadsheets with MarkItDown and pathlib. The full course goes further, with the MarkItDown MCP server in Claude Desktop, image descriptions with OpenAI, and the library’s limits.
Resources mentioned in this lesson:
Course
Converting Documents to Markdown With MarkItDown
Learn how to use MarkItDown to convert Excel files, PDFs, and images into clean Markdown that's ready for LLMs and AI workflows.