How to Install MarkItDown and Convert Files to Markdown
Microsoft's open-source tool that converts PDF, Word, Excel, images and web pages into clean Markdown, ready to hand to an AI to read, summarise or answer questions about.
What is MarkItDown?
MarkItDown is a tool from Microsoft that converts PDF, Word, Excel, images, web pages and more into clean Markdown text, ready to hand to an AI to read. It is open source on GitHub. The point is simple: AI models work best with clean, well-structured text, and most documents are not in that shape. MarkItDown does the conversion so the AI gets the content in a form it understands.
It keeps the layout of the original document, so headings, tables and lists survive the conversion and the AI can follow the structure instead of guessing at a wall of text.
What can you do with it?
- Convert PDF, Word, Excel and image files into clean Markdown
- Keep document structure so AI understands it correctly
- Prepare files for AI summarising and question answering
- Convert a single file or pipe content straight through the command line
- Add plugins for extra file formats when you need them
How to install MarkItDown
MarkItDown needs Python 3.12. First create a virtual environment. If you use uv, run:
uv venv --python=3.12 .venvThen activate it and install MarkItDown with all optional dependencies:
pip install 'markitdown[all]'If you use uv to manage the environment, use uv pip install instead of plain pip install so the package lands in the right environment. The [all] option installs support for every file format; you can install only the formats you need instead, for example pip install 'markitdown[pdf, docx, pptx]'.
First steps after installing
Convert a file from the command line:
markitdown path-to-file.pdf > document.mdUse the -o flag to write to a file by name, or pipe content through it:
cat path-to-file.pdf | markitdownThen give the Markdown file to your AI assistant and ask it to summarise or answer questions. To see which extra formats are available, run markitdown --list-plugins, and enable one with markitdown --use-plugins.
Frequently asked questions
Is MarkItDown free? Yes. It is an open-source project from Microsoft on GitHub, and you can download and use it free of charge.
Is it hard to install? No. Create the virtual environment, run one install command, and you are ready.
Do I need the [all] option? Not necessarily. It is the simplest choice, but you can install only the formats you actually use.
Comments (0)