PDF to Markdown & Document Converter: DOCX, PPTX, XLSX, OCR avatar

PDF to Markdown & Document Converter: DOCX, PPTX, XLSX, OCR

Pricing

Pay per event

Go to Apify Store
PDF to Markdown & Document Converter: DOCX, PPTX, XLSX, OCR

PDF to Markdown & Document Converter: DOCX, PPTX, XLSX, OCR

Convert PDF to Markdown, plus Word (DOCX), PowerPoint (PPTX), Excel (XLSX), HTML and EPUB. Paste a URL, a Google Drive, Dropbox or SharePoint file or folder link, or upload files. Clean Markdown for LLMs and RAG, with OCR for scanned PDFs, tables and chunks. Pay per document.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Pete Buckthought

Pete Buckthought

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 days ago

Last modified

Share

PDF to Markdown & Document Converter (DOCX, PPTX, XLSX, OCR)

Convert PDF to Markdown in one step, and Word (DOCX), PowerPoint (PPTX), Excel (XLSX), HTML, EPUB, CSV and Jupyter files too. Document to Markdown is a PDF and document converter for LLMs and RAG: you get clean Markdown with headings, lists and tables kept, plus page numbers.

The Markdown is ready for LLM prompts, RAG pipelines, vector databases and AI agents. Give it one URL, a list of URLs, Google Drive / Dropbox / OneDrive / SharePoint share links, a whole shared folder link (every supported file in it, subfolders included), or upload files. You get back Markdown plus page counts, word counts, a quality report and optional heading-aware chunks. Scanned PDF pages can be read with optional OCR. You pay per document, not per minute.

For AI agents: input {"url": "https://..."} → output Markdown (dataset row markdown, and the run's OUTPUT record for single-document runs). See Use it from an AI agent (MCP).

What does Document to Markdown do?

  • Gets your documents from public URLs, cloud share links (Google Drive, Google Docs/Sheets/Slides, Dropbox, OneDrive, SharePoint), whole shared folders (Google Drive, Dropbox, SharePoint / OneDrive for Business), files you upload, or private URLs with your own request headers.
  • Detects the real file type from the file's contents, not just its extension or the server's headers.
  • Converts to Markdown. It keeps headings, lists and tables from DOCX, PPTX, XLSX and HTML. PDFs are converted page by page, with <!-- page N --> markers so you can cite page numbers, and section headings are detected from font size and weight.
  • Reads scanned PDF pages with OCR (optional, off by default). Only pages with no text layer are sent to a vision AI model.
  • Reports quality for every document: text coverage, empty and scanned pages, tables found, and plain-English warnings when content may be missing.
  • Optionally splits the Markdown into chunks sized for embeddings. It starts a new chunk at each heading, avoids cutting mid-sentence where it can, adds overlap, and records the PDF page each chunk starts on.
  • Saves results to a dataset you can export as JSON, CSV or Excel, or read via the Apify API. You can also save each document as a .md file.

It is built on Microsoft's open-source MarkItDown (MIT licence) for Office/HTML formats, pdfminer.six and pdfplumber for PDF text and tables.

Why use it?

  • RAG and chatbots: turn manuals, policies, reports and slide decks into text your LLM can read.
  • AI agents: an agent can call this Actor through the Apify API or MCP and get Markdown back in one step.
  • Search and analytics: extract text from many documents at once without running your own conversion server.
  • Predictable cost: a flat price per document, with a small charge only for long documents (see Pricing).

Supported formats

FormatExtensionsNotes
PDF.pdfPage markers included. Headings detected from font size/weight (running headers and footers skipped). Ruled tables become Markdown tables. Scanned pages: turn on ocr, otherwise the quality report lists them.
Word.docxHeadings, lists, tables. Legacy .doc is not supported.
PowerPoint.pptxOne section per slide, including slide notes where present. Legacy .ppt is not supported.
Excel.xlsx, .xlsOne clean Markdown table per sheet: first row as header, empty rows/columns dropped, no NaN or Unnamed cells, dates as ISO dates.
Web pages.html, .htmMain content converted to Markdown. Navigation, sidebars, cookie banners and footers are stripped.
EPUB.epub
CSV.csvConverted to a Markdown table.
Jupyter.ipynbMarkdown and code cells.
Text.txt, .md, .json, .xmlPassed through as text.

ZIP archives, images, audio and video are not processed.

How to use it

  1. Click Try for free (or Start).
  2. Paste a link (a file or a whole shared folder) into Document URL, add more under Document URLs, or use Upload files. Links need no extra step. If you upload, also pick the store you uploaded into under Key-value store with your uploads (see How do I upload files?).
  3. Optional: turn on OCR scanned PDF pages if your PDFs are scans.
  4. Optional: set Chunk size (for example 1500 characters) if you want ready-made chunks for embeddings.
  5. Click Start and download the results from the Output tab.

Input examples

The simplest input (good for AI agents):

{ "url": "https://arxiv.org/pdf/1706.03762" }

A whole shared folder (every PDF, DOCX, PPTX, XLSX... inside, subfolders included):

{ "url": "https://drive.google.com/drive/folders/FOLDER_ID?usp=sharing", "maxFiles": 200 }

A batch with share links, OCR and chunks:

{
"urls": [
"https://arxiv.org/pdf/1706.03762",
"https://drive.google.com/file/d/FILE_ID/view?usp=sharing",
"https://www.dropbox.com/scl/fi/abc123/handbook.docx?rlkey=xyz&dl=0"
],
"ocr": true,
"chunkSize": 1500,
"chunkOverlap": 200,
"includeMarkdown": true,
"saveMarkdownFiles": true
}

Main input options

FieldDefaultWhat it does
url–One document URL or share link.
urls–More URLs or share links. Google Drive/Docs/Sheets/Slides, Dropbox, OneDrive and SharePoint links are turned into downloads automatically (share them as "anyone with the link").
files–Upload files from your computer. Pick the store they were uploaded into in filesStore. Via API: Apify key-value store record URLs (signed URLs work on their own).
filesStore–The key-value store your uploads are in (read-only access to that store only). With files empty, converts every document in the store (up to 1,000).
maxFiles500Folder links: convert at most this many supported files per folder (subfolders included).
includeSubfolderstrueFolder links: also convert files in subfolders. Each result has a relativePath.
maxFolderDownloadMb500Dropbox folder links only: Dropbox sends a folder as one ZIP of everything in it, so bigger folders are refused (link a subfolder or raise this).
requestHeaders–Optional headers such as {"Authorization": "Bearer ..."} for private URLs. Sent only to the host of each URL you give, never to redirects on other hosts. Stored encrypted.
ocrfalseRead scanned PDF pages with a vision AI model (paid add-on, see Pricing).
ocrMaxPagesPerDocument50Cap on OCR pages per document.
ocrModelgoogle/gemini-2.5-flashVision model used for OCR, via Apify's AI proxy.
chunkSize0 (off)Split Markdown into chunks of about this many characters.
chunkOverlap200Characters repeated between chunks.
includeMarkdowntrueInclude the full Markdown in each dataset row.
saveMarkdownFilestrueAlso save each document as a .md file in the run's key-value store, with a download link in the output (markdownFileUrl).
pdfTablestrueAdd tables found in PDFs as Markdown tables (best for tables drawn with lines). Table text also stays in the page text, so tables add some duplicate words, and big PDFs convert about 2–3× slower. Set to false for plain text only.
maxFileSizeMb25Skip files larger than this.
maxPagesPerDocument300Skip documents longer than this, so a huge file can't surprise you with a big bill.
requestTimeoutSecs60Download timeout per file.
maxConcurrency3Documents processed in parallel.

Output example

{
"url": "https://arxiv.org/pdf/1706.03762",
"finalUrl": "https://arxiv.org/pdf/1706.03762",
"fileName": "1706.03762.pdf",
"format": "pdf",
"title": "Attention Is All You Need",
"pageCount": 15,
"pageCountBasis": "pages",
"wordCount": 5830,
"charCount": 38426,
"markdown": "<!-- page 1 -->\n\nProvided proper attribution is provided, Google hereby grants permission to\nreproduce the tables and figures in this paper ...",
"chunks": [
{ "index": 0, "heading": null, "page": 1, "text": "Provided proper attribution is provided, ...", "charCount": 173 },
...
{ "index": 10, "heading": "3.2 Attention", "page": 3, "text": "### 3.2 Attention\n\nAn attention function can be described as mapping a query and a set of key-value pairs to an output, ...", "charCount": 542 }
],
"quality": {
"tablesFound": 0,
"pagesWithText": 15,
"textCoverage": 1.0,
"emptyPages": [],
"scannedPages": [],
"ocrPages": [],
"possibleContentLoss": false,
"warnings": []
},
"markdownFileUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/attention-is-all-you-need-1a2b3c4d.md?signature=...",
"status": "ok",
"error": null,
"convertedAt": "2026-10-27T20:04:00+00:00"
}

For a PDF with a scanned page and OCR off, quality looks like this, so you can catch silent content loss:

{
"tablesFound": 0, "pagesWithText": 1, "textCoverage": 0.5,
"emptyPages": [3], "scannedPages": [2], "ocrPages": [],
"possibleContentLoss": true,
"warnings": ["1 page(s) look scanned (an image, or text drawn as shapes) and have no text: 2. Turn on OCR to read them."]
}

textCoverage is the share of pages with content (text or images) that ended up with text. Blank pages don't count against it.

Files that can't be converted (not found, too large, unsupported type, password-protected) appear as rows with "status": "error" and a plain-English error. Failed files are not charged.

Converting a whole folder

Paste a shared folder link into url or urls. The Actor finds every supported file in the folder (and its subfolders, unless you turn includeSubfolders off) and converts each one into its own result row, with folderUrl and relativePath (for example Reports/2024/q1.pdf). Images, videos and other unsupported files are skipped and listed in the run's status message and in the FOLDER_SUMMARY record of the run's key-value store.

Folder link fromWorks?How
Google Drive (drive.google.com/drive/folders/...)YesGoogle Docs, Sheets and Slides in the folder are exported as DOCX, XLSX and PPTX.
Dropbox (dropbox.com/scl/fo/...)YesDropbox only shares a folder as one ZIP of everything in it, so the whole folder is downloaded (up to maxFolderDownloadMb) and the supported files inside are converted.
SharePoint / OneDrive for Business (...sharepoint.com/:f:/...)YesOnly the supported files are downloaded.
OneDrive personal (1drv.ms/f/..., onedrive.live.com)NoMicrosoft now requires a sign-in to list these folders. Upload the files, or share from one of the services above.

The folder must be shared as "Anyone with the link can view". Private folders get a clear error and are not charged. Billing is the same as for single files: one document event per converted file (plus pages above 20 and OCR pages), nothing for skipped or failed files. Use maxFiles and your maximum cost per run to cap a big folder: the Actor checks the remaining budget before downloading each file and stops cleanly, telling you how many files were left.

Pricing

This Actor uses pay-per-event pricing. You only pay for documents that convert successfully:

EventPrice
Actor start$0.003 per run
Document converted (includes up to 20 pages)$0.003
Each page above 20$0.001
OCR page (only when ocr is on, only scanned pages that were read)$0.008

Examples: a 10-page DOCX costs $0.003. A 77-page PDF costs $0.003 + 57 × $0.001 = $0.06. 1,000 short documents cost about $3. A 10-page scanned PDF with OCR on costs $0.003 + 10 × $0.008 = $0.083.

OCR model usage is billed by Apify to your account at cost through its AI proxy, on top of the price above. With the default model this was about $0.001 per page in our tests. Text pages are never sent for OCR.

For PDFs and slide decks the page count is the real page or slide count. For other formats it is counted as one page per 500 words (pageCountBasis: "word-equivalent").

If you set a maximum cost per run, the Actor checks before converting each document. It stops cleanly when the next document wouldn't fit, rather than charging partway through one. Apify's free plan includes monthly usage credit that you can use to try this Actor.

Limitations

  • OCR is AI-based and slower. It is accurate on clean scans but can misread poor scans or handwriting, and very dense pages may be cut off (the quality report warns you). Expect roughly 10–20 seconds per page (4 pages run in parallel). OCR only runs on pages with no text layer, so text inside images on normal pages (charts, screenshots) is not read.
  • PDF layout: multi-column PDFs are read in the order the text appears in the file, which is usually but not always reading order. PDF table detection works best for ruled tables. Borderless tables stay as plain text, and charts are occasionally mistaken for tables.
  • PDF headings are a best guess. They are inferred from font size and bold text, so PDFs that style headings like body text get few or none, and the odd bold line may be promoted to a heading.
  • HTML clean-up is rule-based. Common navigation, sidebar, cookie and footer blocks are removed, but unusual page templates may keep some boilerplate. Only the page you give is fetched; JavaScript-rendered pages may come out empty.
  • Folder links: Google Drive, Dropbox and SharePoint / OneDrive for Business folders work; OneDrive personal folders don't (Microsoft requires a sign-in). Google Drive shortcuts to other files are skipped, and Dropbox folders are downloaded whole, so very large Dropbox folders with videos need a subfolder link or a higher maxFolderDownloadMb.
  • Access: files behind a login work only if you can pass the right requestHeaders. Cloud share links must be shared as "anyone with the link". New-style OneDrive personal links that require a Microsoft sign-in can't be downloaded; upload the file instead (OneDrive for Business / SharePoint links work). For security, addresses on private networks (such as 10.x, 192.168.x, localhost, cloud metadata) are blocked.
  • Legacy .doc and .ppt are not supported. Save them as .docx or .pptx first.

Use it from an AI agent (MCP)

Add Apify's MCP server to your agent (Claude, Cursor, VS Code and others) with only this Actor as a tool:

{
"mcpServers": {
"document-to-markdown": {
"url": "https://mcp.apify.com?tools=flyingkiwi/document-to-markdown"
}
}
}

The agent sees a tool for this Actor. It signs you in to Apify with OAuth on first use, or you can add an "Authorization": "Bearer <APIFY_TOKEN>" header instead. A typical call is just:

{ "url": "https://example.com/report.pdf" }

The tool returns the converted row (Markdown, page and word counts, quality report). The agent can check quality.possibleContentLoss before trusting the text, and retry with "ocr": true if scannedPages is not empty.

From code, one HTTP call returns the Markdown:

curl -X POST "https://api.apify.com/v2/acts/flyingkiwi~document-to-markdown/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' -d '{"url": "https://arxiv.org/pdf/1706.03762"}'

For single-document runs, the plain Markdown is also saved as the run's OUTPUT record (text/markdown), so run-sync (which returns OUTPUT) gives you the Markdown text directly.

Privacy and responsible use

  • Only convert documents you have the right to use. This Actor downloads only the URLs you give it and does not crawl other pages.
  • Documents are processed inside your Apify run. Results are stored only in your run's own storage, which follows your Apify data-retention settings. By default nothing is sent to any AI model or third-party service.
  • When you turn on OCR, images of the scanned pages (and only those pages) are sent through Apify's AI proxy to the model you choose (default: Google Gemini 2.5 Flash via OpenRouter). Don't turn OCR on for documents you aren't allowed to share with that provider.
  • Request headers you enter are stored as encrypted secret input and sent only to the hosts of your URLs.
  • The developer of this Actor can't see your inputs or results.

FAQ

Can I use it from an AI agent or via API? Yes. See the MCP section above, or call it like any Apify Actor through the Apify API and client libraries.

How do I upload files?

  1. In Upload files, click to upload and choose your documents. Apify asks which key-value store to put them in: pick an existing store or create a new one (for example my-documents).
  2. In the next field, Key-value store with your uploads, pick that same store.
  3. Click Start.

The second step is how Apify gives this Actor read-only access to that one store; it can't see anything else in your account. If you forget it, the result row tells you which store to pick. If you use the same store every time, you only choose it once per saved task. Links skip all of this: public URLs and Google Drive, Dropbox, OneDrive or SharePoint file or folder links work with no extra steps.

Can I convert files from Google Drive or Dropbox? Yes. Paste the normal share link (shared as "anyone with the link"), for a single file or a whole folder. Google Docs, Sheets and Slides are exported as DOCX, XLSX and PPTX first. For private files, upload them instead.

Can it read scanned PDFs? Yes, with "ocr": true. Only pages without a text layer are OCR'd and charged.

Does it keep images? No. Images are not extracted. Image alt text from HTML/DOCX may appear.

Something didn't convert correctly? Please open an issue in the Issues tab with the file URL (if it's public) and we'll look into it.


Not affiliated with Microsoft. MarkItDown is used under its MIT licence.