PDF to Markdown – DOCX, PPTX, XLSX & HTML for LLM & RAG avatar

PDF to Markdown – DOCX, PPTX, XLSX & HTML for LLM & RAG

Pricing

$1.00 / 1,000 page converteds

Go to Apify Store
PDF to Markdown – DOCX, PPTX, XLSX & HTML for LLM & RAG

PDF to Markdown – DOCX, PPTX, XLSX & HTML for LLM & RAG

Convert PDF to Markdown, plus Word (DOCX), PowerPoint (PPTX), Excel (XLSX/CSV) and HTML documents, into clean LLM-ready Markdown or plain text. Keeps headings, lists and tables, adds metadata and RAG chunking (per page or by tokens with overlap). Pay only per page.

Pricing

$1.00 / 1,000 page converteds

Rating

0.0

(0)

Developer

Enes Bulanık

Enes Bulanık

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

19 hours ago

Last modified

Share

Convert PDF to Markdown, plus Word (DOCX), PowerPoint (PPTX), Excel (XLSX/CSV) and HTML documents, into clean LLM-ready Markdown or plain text. Keeps headings, lists and tables, adds metadata and RAG chunking (per page or by tokens with overlap). Pay only per page.

Price: $1 per 1,000 pages. Failed downloads and unsupported files are free.

What does Document to Markdown do?

Give it links (or uploaded files) and it returns one dataset item per document, or one item per chunk:

  • 📄 PDF: text layer with headings (from font size, bold weight and section numbers like 3.2.1), bullet and numbered lists, de-hyphenated paragraphs. Running headers, footers and page numbers are removed. Handles large PDFs (a 142-page PDF converts in about 5 s).
  • 📝 DOCX: headings, lists, bold/italic, links, footnotes and tables as Markdown tables (via mammoth).
  • 📊 PPTX: one section per slide (## Slide 3: Title), bullet hierarchy, tables, optional speaker notes.
  • 📈 XLSX / XLS / ODS / CSV: every sheet becomes a Markdown table with formatted values (dates and currencies as displayed).
  • 🌐 HTML pages: main-content extraction (Mozilla Readability) without menus, footers or ads. Links and images are made absolute.
  • 🧾 TXT / MD: passed through and chunked.
  • 🏷 Metadata: title, author, subject, keywords, created/modified dates, producer, language, sheet names, page count.
  • ✂️ Chunking for RAG: none, page (page, slide or sheet; DOCX/HTML split at H1/H2 headings) or tokens (for example 800 tokens with 100 overlap). Every chunk has pageStart/pageEnd and tokensEstimate.

The file type is detected from the file content, so links without an extension (such as https://arxiv.org/pdf/1706.03762) work too.

Why use it?

  • One tool for all office formats. Other Store actors are mostly PDF-only. This one takes the mixed folders real projects have.
  • Built for LLMs and RAG. You get Markdown structure instead of a flat text dump, chunking with overlap, token estimates, and page numbers for citations.
  • Fair pay-per-page pricing. Chunking and output format don't change the price. You never pay for errors.
  • Fast and light. No browser and no OCR engine, so most documents finish in under a second.

Use cases

  • RAG / vector databases: chunk manuals, contracts, reports and papers before embedding them into Pinecone, Qdrant, Weaviate or pgvector.
  • AI agents: let an agent read a PDF or spreadsheet a user links to (see the MCP section).
  • Knowledge bases and search: turn SharePoint/Drive exports (DOCX, PPTX, XLSX) into Markdown for Notion, Confluence or static sites.
  • Data extraction: get Excel sheets and Word tables as clean Markdown tables for LLM-based extraction.
  • Research: convert arXiv papers to Markdown for summarization or literature reviews.

How to use it

  1. Paste document links into Document URLs, or upload files in Uploaded files.
  2. Choose the Output format (Markdown, plain text or both) and Chunking.
  3. Optionally limit pages with Page range (1-10) and Max pages per document.
  4. Click Start and export the results as JSON, CSV or Excel, or use the API.

Input example

{
"fileUrls": [
"https://arxiv.org/pdf/1706.03762",
"https://raw.githubusercontent.com/scanny/python-pptx/master/features/steps/test_files/test.pptx",
"https://en.wikipedia.org/wiki/Markdown"
],
"outputFormat": "markdown",
"chunking": "tokens",
"chunkSize": 800,
"chunkOverlap": 100,
"maxPages": 50
}
FieldDescriptionDefault
fileUrlsLinks to PDF, DOCX, PPTX, XLSX/XLS/ODS/CSV, HTML, TXT, MDdemo arXiv PDF
filesUploaded files (Apify key-value store) or record keys–
outputFormatmarkdown, text or bothmarkdown
chunkingnone, page or tokensnone
chunkSize / chunkOverlapChunk size and overlap in tokens (≈ 4 characters)1000 / 100
pageRangee.g. 1-5, 1,3,7-9, 10- (PDF pages, slides, sheets)all
maxPagesMax pages per document (0 = no limit)200
includeTablesTables as Markdown tables (otherwise tab-separated)true
includeSpeakerNotesPPTX speaker notestrue
extractMainContentHTML: main article onlytrue
maxRowsPerSheetSpreadsheet row cap per sheet5000
maxFileSizeMbSkip larger files100

An empty input ({}) converts a demo document (the arXiv paper "Attention Is All You Need").

Output

Real output, shortened. Document (chunking: none):

{
"type": "document",
"url": "https://arxiv.org/pdf/1706.03762",
"source": "url",
"fileName": "1706.03762v7.pdf",
"fileType": "pdf",
"title": "Attention Is All You Need",
"pages": 15,
"totalPages": 15,
"pageStart": 1,
"pageEnd": 15,
"chunkIndex": 0,
"chunkCount": 1,
"markdown": "Provided proper attribution is provided, Google hereby grants permission to reproduce the tables and figures in this paper...\n\n### Attention Is All You Need\n\n...\n\n### Abstract\n\nThe dominant sequence transduction models are based on complex recurrent or convolutional neural networks...\n\n### 1 Introduction\n\nRecurrent neural networks, long short-term memory [13] and gated recurrent [7] neural networks...\n\n#### 3.1 Encoder and Decoder Stacks\n\n...",
"text": null,
"tokensEstimate": 10074,
"wordCount": 6254,
"metadata": {
"creator": "LaTeX with hyperref",
"producer": "pdfTeX-1.40.25",
"createdAt": "2024-04-10T21:11:43.000Z",
"pdfVersion": "1.5"
},
"warnings": [],
"truncated": false,
"convertedAt": "2026-10-07T19:12:28.445Z"
}

Spreadsheet (Book1.xlsx, sheet 2):

## Sheet: Sheet2
| Monitor | | Brand | |
| --- | --- | --- | --- |
| > 23 Inch | 19 | HP | 200 |
| 20-23 Inch | 24 | DELL | 450 |

Chunk (chunking: tokens): same fields, with "type": "chunk", chunkIndex/chunkCount and the pageStart/pageEnd the chunk covers.

Error (free):

{
"type": "error",
"url": "https://example.com/does-not-exist.pdf",
"fileName": "does-not-exist.pdf",
"errorCode": "DOWNLOAD_FAILED",
"error": "HTTP 404 Not Found"
}

Error codes: INVALID_URL, DOWNLOAD_FAILED, FILE_TOO_LARGE, UNSUPPORTED_FORMAT, ENCRYPTED, NO_TEXT_LAYER (scanned PDF), NO_CONTENT, NO_PAGES_SELECTED, CONVERSION_FAILED.

The dataset has two views in Console: Overview and Document metadata.

Pricing

Pay per event: you pay only for converted pages, and platform usage is included.

EventPriceWhat counts as a page
page$0.001 ($1 per 1,000)1 PDF page, 1 slide, 1 sheet; DOCX: page count from document properties (or ~500 words); HTML/TXT: ~3,000 words (minimum 1)
ErrorsFreeFailed downloads, unsupported or scanned files, empty documents
JobCost
15-page paper$0.015
100 documents × 10 pages$1.00
142-page PDF$0.142
50 web pages (≈1 page each)$0.05

Chunking and output format do not change the price. Use Max pages per document and Apify's Max cost per run to cap spending. The Actor stops cleanly at your budget and truncates the last document if needed (truncated: true).

Use with AI agents (MCP)

This Actor works as a tool for AI agents through the Apify MCP server (Claude, Cursor, VS Code, OpenAI Agents and others). Example tool input:

{ "fileUrls": ["https://arxiv.org/pdf/1706.03762"], "chunking": "page", "pageRange": "1-5", "outputFormat": "markdown" }

The agent gets Markdown per page with page numbers, so it can quote and cite exact pages. Use pageRange / maxPages to keep context windows and costs small.

FAQ

Does it do OCR on scanned PDFs? Not in this version. Scanned or image-only PDFs have no text layer. They are detected and returned as a free NO_TEXT_LAYER error row.

How good is PDF structure detection? Headings are inferred from font size, bold fonts and numbering (1, 3.2, A.1). Lists come from bullet and number prefixes. This works well for papers, reports and manuals. PDF tables are output as text lines, not Markdown tables, because PDFs have no table structure. Multi-column layouts follow the PDF's internal reading order, which is correct for most generators (LaTeX, Word, InDesign).

Are images extracted? No. Images are skipped (DOCX alt text is kept as [Image: …], and HTML images keep their URL).

Old .doc / .ppt files? Legacy binary Word/PowerPoint files are not supported. Save them as .docx/.pptx or PDF. Legacy .xls spreadsheets are supported.

Password-protected files? They are reported as a free ENCRYPTED error.

How do I upload my own files? Use the Uploaded files field in Console. Through the API, put the files in a key-value store and pass the record URLs (or record keys of the run's default store) in files.

How are tokens counted? tokensEstimate uses ~4 characters per token. That is close to OpenAI/Anthropic tokenizers for English. Use a real tokenizer if you need exact counts.

The Actor only downloads documents from the URLs you provide (or files you upload). It does not crawl or log in anywhere. Make sure you have the right to process the documents, and respect copyright and the terms of the sites hosting them. Documents can contain personal data. If yours do, handle the output in line with GDPR and other applicable laws.

  • Coming soon: Academic Papers Search (OpenAlex, arXiv, Crossref)
  • Coming soon: Website to Markdown Crawler
  • Coming soon: Google News Scraper with full text

Support & feedback

Found a document that converts badly? Open an issue in the Issues tab with the URL. We usually answer within a day.