MarkPrep

Convert documents to Markdown from the command line

The MarkPrep command-line converter turns PDF, Word, Excel and other documents into Markdown from your terminal or a script. It converts one file at a time, or every file in a folder, including new files as they arrive.

Pro feature · activated by your licence key

Convert one file

Writes the Markdown to a file, or prints it if you leave out -o:

# macOS and Linux
export MARKPREP_LICENSE=your-licence-key

# Windows PowerShell
$env:MARKPREP_LICENSE="your-licence-key"

npx markprep convert report.pdf -o report.md

Convert many files in a script

In a bash or PowerShell script, call convert once for each file. This bash loop converts every Word file in a folder and writes a .md file next to each one:

for f in *.docx; do npx markprep convert "$f" -o "${f%.docx}.md"; done

Watch a folder

Converts every supported file in ./inbox, then any file you add or change, into ./markdown. Press Ctrl+C to stop.

npx markprep watch ./inbox -o ./markdown

Use it from an AI assistant

The command npx markprep mcp starts the same converter as an MCP server, a local tool your AI assistant can call. Claude Code or Claude Desktop can then convert files when you ask. Set up the MCP server.

Get the command-line converter

Pro costs a one-time £19 and includes both the command-line converter and the MCP server. Your licence key arrives by email.

See pricing

Frequently asked questions

Which files does the command-line converter handle?+

.pdf (files with a text layer), .docx, .xlsx, .xls, .html, .htm, .csv, .tsv, .json, .md, .markdown and .txt. For scanned PDFs (OCR), PowerPoint and EPUB, use the converters on the website.

What do I need?+

Node.js 18 or newer, an internet connection for the licence check, and a Pro licence key (a one-time £19). Set the key in the MARKPREP_LICENSE environment variable.

Are my files uploaded?+

No. Files are read and converted on your computer. Each run sends only your licence key to markprep.online to check it.

How does watch mode name the output?+

Each file is written to the output folder with the same name and a .md extension, for example report.pdf becomes report.md. Files already in the folder when you start are converted too, and a file is converted again when it changes.

Is this the same as the MCP server?+

Both come in the markprep npm package. The markprep mcp command starts the MCP server for Claude Code and other MCP apps. The convert and watch commands are for the terminal and scripts.

Is it on Homebrew, or available as an .exe?+

No. It is an npm package that runs on Node.js through npx, on Windows, macOS and Linux. There is no Homebrew formula and no .exe file.