Free

MarkItDown: convert documents to Markdown for Codex

Convert documents to Markdown with MarkItDown and Codex. Check text, headings and tables against the originals before using them in a report or knowledge base.

Tools

Installation instructions · Download source code (ZIP)

MarkItDown converts document content to Markdown: plain text with headings and tables. This makes it easier for Codex to read material for a report or knowledge base.

What you can use it for

  • Extract text from Word, presentations or PDFs for analysis.
  • Prepare documents for a searchable knowledge base.
  • Extract table content, then check its figures and calculations separately.

It extracts content rather than preserving page layout. Keep the original alongside the output to check presentation.

How to install

  1. Ask Codex to find the available Python environment and create a separate environment for conversion.
  2. Install the formats you need using the official guide. For example, pip install 'markitdown[pdf,docx,pptx]' adds PDF, Word and PowerPoint support. The markitdown[all] option installs all extras.
  3. Choose one document and a new output file. Example: markitdown input.pdf -o output.md. The assistant will substitute the actual paths.
  4. Open the output and compare key passages with the original.

How to use it in Codex

Codex can run the program from the project terminal when it has terminal access. This does not require MCP: the assistant converts the document and reads the output file. Scanned pages and image descriptions need additional configuration; normal text extraction is not a replacement for OCR.

Useful instructions

The PDF extraction-method step uses MarkItDown for files with native text. You can then build an assistant for your documents. The official README describes supported formats and additional processing options.

How to check the result

Compare section names, important figures and table rows. For image-only PDFs, choose text recognition. If a table is damaged, check its rows against the original rather than treating the Markdown as a verified dataset for calculations.

Prompt for Codex

Paste this into Codex or Work with access to the documents. It will locate the files, choose the required dependencies and save output separately.

Find the documents for my task in the current project and extract their text using official MarkItDown. Check the available environment and supported formats at https://github.com/microsoft/markitdown. If installation is needed, propose a separate environment and install only the required dependencies after approval. Substitute the actual paths yourself and preserve the originals. Save Markdown with a clear reference to each source. Compare important figures, headings and tables; identify parts that need OCR or manual verification. Explain where the output is and how to use it next.
In this article
Saved