Document-to-Markdown API for AI agents

Your agent works best with plain text, but the documents it gets handed are PDFs, Word files and spreadsheets. mdconvert turns them into clean Markdown (or plain text, CSV or HTML) with one API call, so your pipeline spends its tokens on the content instead of the layout.

We accept CSV, DOC, DOCX, EPUB, HTM, HTML, MARKDOWN, MD, MDOWN, ODS, ODT, PDF, PPTX, RTF, TXT, XLS, XLSX. Our own local engines handle most files. Scanned PDFs need OCR, which is available once you've bought a credit pack.

Every conversion returns JSON with a download link for the result. All you need for an API key is a free account with a verified email. When you want the details, the full API documentation has every parameter.

Quickstart

  1. Create an account at https://mdconvert.org/register and verify your email.
  2. Create an API key at https://mdconvert.org/account.
  3. Send your first file to POST https://mdconvert.org/api/v1/convert, with the key in an Authorization: Bearer header (or X-API-Key):
curl -H "Authorization: Bearer <key>" \
  -F file=@doc.docx -F target_format=md \
  https://mdconvert.org/api/v1/convert

Check before you convert. Not sure which engine a file needs, or what it will cost? Send it to POST https://mdconvert.org/api/v1/detect first. It tells you which engine it would use, what kind of PDF it is, the cost tier, and the most that cloud OCR could cost in credits (priced by document size, minimum 2 credits). It converts nothing and costs nothing.

Let mdconvert choose. On /convert, leave out engine (or send engine=auto) and the app picks the method for you. The JSON response includes a selection block that explains its choice, so your agent can see why.

Endpoints

  • GET https://mdconvert.org/api/v1/status: capabilities + live limits (no auth)
  • POST https://mdconvert.org/api/v1/detect: pre-flight (free, no charge; auth required)
  • POST https://mdconvert.org/api/v1/convert: single file (auth required; omit engine to auto-select)
  • POST https://mdconvert.org/api/v1/convert/batch: up to 50 files per request; extra files are skipped and counted in the skipped field
  • POST https://mdconvert.org/api/v1/ocr: scanned PDF OCR (once you've bought a credit pack)
  • MCP Streamable HTTP: config at /docs/mcp, endpoint POST https://mdconvert.org/mcp (same API key)

In a batch, each file counts on its own, exactly as if you had sent it by itself. If your credits run out partway, the remaining files come back marked no_credits. A file that fails to convert isn't counted.

What comes back

  • PDF: the text, with tables drawn with lines as Markdown tables. Headings that stand out (bold or larger) and bullet lists are recognised; plainer headings may come through as ordinary text. Pictures inside a PDF are not extracted.
  • Word: the text, headings set with Word's heading styles, lists and tables. To get the pictures too, send mode=full: the response then adds a link to a .zip with the Markdown and its images. The .zip can be downloaded once.
  • Excel: each sheet becomes a Markdown table.
  • PowerPoint: one section per slide, with the slide title as a heading and the speaker notes kept.

The result won't look like the original file: it's the content, ready for a model. When the app notices that something went missing (text from a Word file, overlapping text layers in a PDF, letters it couldn't decode), the response says so in its warnings list.

Limits

WhoDaily HourlyMax file Notes
No account (website only) 2 — 12 MB Local engines only
Free account (verified email) 5 20 12 MB API key after email verification
Credit pack credits 20 64 MB Cloud OCR unlocked

On a free account, PDFs can have up to 32 pages.

Fair use is simple: register once, verify your email, and stay within the caps above. That's all we ask.

Your agent can read the current limits at any time from GET https://mdconvert.org/api/v1/status, and find a map of the site at https://mdconvert.org/llms.txt.

Your files

Uploaded files and their results are deleted automatically after about 24 hours. If a conversion fails or shows a warning, we keep a copy longer, only to fix the problem; the privacy policy has the details.

We don't use any data to train AI.

One thing to know: to read scanned pages, OCR sends them to outside AI providers, and their own data policies apply to those pages.

Pricing

A free account with a verified email gets you an API key, a one-time welcome bonus of 100 credits, then 5 free credits a day. An ordinary file costs 1 credit; an older Word file in the .doc format costs 3.

A credit pack adds cloud OCR for scanned PDFs and files up to 64 MB. Current plans and prices are on the pricing page.

View pricing