pdftomarkdown
📄 PDF to Markdown (PDF to MD) — 快速、私密、開源轉換器
終極開源 PDF 轉 Markdown 轉換器,專為人類、開發者與 AI 代理設計。
輕鬆將 PDF、Word (.docx)、Excel 與 CSV (.xlsx、.csv) 以及 YouTube 網址轉換成乾淨、結構化、Token 效率高的 Markdown (.md)。
📑 目錄
Related MCP server: Markdownify MCP Server
🎯 為什麼選擇 PDF to Markdown?
PDF 是為了視覺列印而設計,不適合編輯或 AI 運算。它們將內容困在固定座標的二進位檔案中。Markdown (.md) 是通用的標準,適用於:
🤖 AI 與 LLM 工作流程:透過移除版面多餘內容,最大化 Claude、ChatGPT、Cursor 和 Gemini 的提示 Token 密度。
🗂️ 知識管理:輕鬆匯入 Obsidian、Notion、Logseq、Roam 和 Apple Notes。
📝 技術文件:直接匯入靜態網站產生器,如 Docusaurus、VitePress、MkDocs 和 Astro。
🌿 Git 版本控制:清晰的逐行差異,而非難以理解的二進位變更。
🏗️ 架構與轉換流程
INPUT SOURCE
┌──────────────────────────────┬──────────────────────────────┐
▼ ▼ ▼
📄 PDF Document 📝 Word / Excel 🎥 YouTube Link
(Local / Remote URL) (.docx, .xlsx, .csv) (Video URL / Shorts)
│ │ │
└──────────────────────────────┼──────────────────────────────┘
▼
┌──────────────────────────────────────┐
│ Unified Geometric & NLP Engine │
├──────────────────────────────────────┤
│ • Visual Reading Order Sorter │
│ • H1–H4 Typography Hierarchy │
│ • GFM Table Reconstructor │
│ • Code Block & List Parser │
│ • Link & Metadata Extractor │
└──────────────────────────────────────┘
│
▼
CLEAN MARKDOWN
┌──────────────────────────────┼──────────────────────────────┐
▼ ▼ ▼
🌐 Web UI Workspace 💻 CLI Output Stream 🤖 AI Agent Context
(Split Editor + Preview) (stdout / .md file export) (Claude / Cursor MCP)✨ 主要特色
🔒 100% 瀏覽器內隱私:在網頁應用程式中,文件透過 WebAssembly / JavaScript 在記憶體中本地轉換。零檔案上傳至任何外部伺服器。
⚡ 免安裝 CLI(
npx):直接從命令列轉換任何 PDF、Word 文件或 CSV,無需設定。📊 智慧表格偵測:自動將多欄位列對齊為乾淨的 GitHub Flavored Markdown (GFM) 管線表格(
| 標題 | ... |)。🗂️ 多格式擴充性:將 PDF、Word (
.docx)、Excel/CSV (.csv) 和 YouTube 影片轉換為 Markdown。🤖 原生 Model Context Protocol (MCP) 伺服器:零程式碼直接連接 Claude Desktop、Cursor、Windsurf 和 Antigravity。
🎨 極簡雙面板工作區:即時並排的原始 Markdown 編輯器與渲染 HTML 預覽,包含行數、字數與字元計數器。
🚀 極速:毫秒內轉換標準多頁文件,無需重型 GPU 或多 GB 模型。
🚀 如何使用(3 種方式)
1. 即時網頁應用程式(零安裝)
拖曳任何 PDF 檔案。
點擊 轉換為 Markdown。
並排預覽渲染後的文件,然後點擊 複製 Markdown 或 下載 .md。
2. 免安裝 CLI(npx)
無需安裝。直接在終端機中執行:
# Convert a local PDF file
npx pdftomarkdown research-paper.pdf -o paper.md
# Convert a Word document (.docx)
npx pdftomarkdown document.docx -o doc.md
# Convert a CSV table to GFM pipe tables
npx pdftomarkdown financials.csv -o financials.md
# Extract timestamped transcript from a YouTube video
npx pdftomarkdown "https://www.youtube.com/watch?v=dQw4w9WgXcQ" > video.md
# Convert with an automatic Table of Contents
npx pdftomarkdown manual.pdf --toc -o manual.md
# Pipe directly into an AI tool / LLM
cat quarterly-report.pdf | npx pdftomarkdown | llm "Summarize the key takeaways"3. AI 代理與 MCP 伺服器(Claude / Cursor)
以零程式碼為您的 AI 助理配備 PDF to Markdown 功能。
Claude Desktop 設定:
將此項目加入您的 claude_desktop_config.json:
{
"mcpServers": {
"pdftomarkdown": {
"command": "npx",
"args": ["-y", "pdftomarkdown", "--mcp"]
}
}
}現在您可以提示 Claude:
「讀取
whitepaper.pdf並將其轉換為包含目錄的乾淨 Markdown。」
📊 基準測試與比較矩陣
功能 | pdftomarkdown | PSPDFKit | Marker | Microsoft MarkItDown |
即時網頁應用程式 | ✅ 是 (pdftomarkdown.fyi) | ❌ 否 | ❌ 否 | ❌ 否 |
100% 瀏覽器內隱私 | ✅ 是 (0 上傳) | ❌ 否 | ❌ 否 | ❌ 否 |
免安裝 CLI( | ✅ 是 | ✅ 是 | ❌ (重量級 Python) | ❌ (Python pip) |
即時渲染預覽 | ✅ 是 (並排) | ❌ 否 | ❌ 否 | ❌ 否 |
Word ( | ✅ 是 | ❌ 否 | ❌ 否 | ✅ 是 |
Excel / CSV 轉 GFM 表格 | ✅ 是 | ❌ 否 | ❌ 否 | ✅ 是 |
YouTube 影片轉逐字稿 | ✅ 是 | ❌ 否 | ❌ 否 | ✅ 是 |
Model Context Protocol (MCP) | ✅ 是 (內建) | ⚠️ 部分 | ❌ 否 | ⚠️ 僅限 Python |
執行速度 | ⚡ < 200 ms / 頁 | ⚡ < 200 ms / 頁 | 🐢 5–20 秒 (GPU) | ⚡ < 500 ms / 頁 |
硬體需求 | 🪶 輕量級 (JS) | 🪶 輕量級 | 🐘 龐大 (10GB+ PyTorch) | 🐍 Python 環境 |
🗂️ 支援的格式
格式 | 副檔名 | 輸出樣式 |
PDF 文件 |
| 標題 (H1–H4)、清單、GFM 表格、連結、程式碼區塊 |
Word 文件 |
| 標題、粗體/斜體、項目符號清單、乾淨連結 |
Excel 與 CSV |
| GitHub Flavored Markdown (GFM) 管線表格 |
YouTube 網址 |
| 帶時間戳的逐字稿 ( |
純文字與程式碼 |
| 格式化程式碼圍欄與可讀的 Markdown 區塊 |
🛠️ CLI 參考與選項
pdftomarkdown — The universal document to Markdown converter.
Usage:
npx pdftomarkdown <file-or-url> [options]
Options:
-o, --output <file> Write output directly to a file (.md)
--toc Automatically generate a Table of Contents
--no-tables Disable automatic GFM table detection
--mcp Start Model Context Protocol (MCP) server
-v, --version Show current version
-h, --help Show help documentation💻 程式化 API(Node / TypeScript)
您可以直接在 Node.js 或 TypeScript 專案中匯入並使用轉換器:
import { convertPdfToMarkdown, convertAnyToMarkdown } from 'pdftomarkdown';
// Convert a PDF buffer or file
const markdown = await convertPdfToMarkdown(pdfBuffer, {
includeToc: true,
detectTables: true,
preservePageBreaks: true,
});
console.log(markdown);🔍 技術 SEO 與效能
主要關鍵字:PDF 轉 Markdown、PDF 轉 MD、PDF 轉 Markdown 轉換器、將 PDF 轉換為 Markdown。
次要關鍵字:線上 PDF 轉 Markdown、免費 PDF 轉 Markdown 轉換器、將 PDF 檔案轉換為 Markdown、從 PDF 擷取 Markdown、Word 轉 Markdown、YouTube 轉 Markdown。
技術標準:語意化 HTML5、Schema.org
WebSite、WebApplication和FAQPageJSON-LD 結構化資料、sitemap.xml、robots.txt。零用戶端負擔:解析引擎上無重量級 UI 框架,最佳化的 WebAssembly 工作執行緒。
❓ 常見問題(FAQ)
什麼是 PDF 轉 Markdown 轉換?
PDF 轉 Markdown 轉換會解析固定版面 PDF 檔案內的幾何、字型與文字位置,並將其轉換為純文字 Markdown (.md) 格式,保留標題、清單、表格與連結。
如何免費將 PDF 轉換為 Markdown?
您可以使用 pdftomarkdown.fyi 的即時網頁應用程式,或在終端機中執行 npx pdftomarkdown input.pdf -o output.md。兩者皆 100% 免費,無需註冊或訂閱。
我的文件會被保密嗎?
是的。使用網頁應用程式時,所有解析都在您瀏覽器的記憶體中本地進行。任何檔案或文字串流都不會傳送至我們的伺服器。
我可以將 PDF 中的表格轉換為 Markdown 嗎?
可以。我們的引擎會偵測水平與垂直對齊的文字欄位,並將其格式化為標準的 GitHub Flavored Markdown (GFM) 管線表格。
我可以將輸出用於 ChatGPT、Claude 和 LLM 嗎?
可以。乾淨的 Markdown 是 AI 提示與 RAG 向量資料庫的最佳輸入格式,可最小化 Token 使用量,同時保持文件階層結構。
📄 授權與免責聲明
以 MIT 授權 發布。詳細資訊請參閱 LICENSE。
免責聲明: 所有產品名稱、標誌與品牌(包括 Microsoft、PSPDFKit/Nutrient、Marker、Claude 和 ChatGPT)均為其各自所有者的財產,僅用於識別、相容性與比較目的。
版權所有 © 2026 PDF to Markdown
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConverts various file types (documents, images, audio, web content) to markdown format without requiring Docker, supporting PDF, Word, Excel, PowerPoint, images, audio files, web URLs, and more.29614MIT
- AlicenseAqualityDmaintenanceConverts various file types (PDF, images, audio, DOCX, XLSX, PPTX) and web content (YouTube videos, web pages, Bing search results) into Markdown format for easy reading and sharing.10366MIT
- FlicenseAqualityCmaintenanceConverts files (PDF, DOCX, PPTX, XLSX, images via OCR) and URLs to Markdown, enabling AI clients to read them via a single MCP tool.1
- AlicenseAqualityCmaintenanceConverts PDF, DOCX, PPTX, XLSX, CSV, and JSON into clean, compact, AI-ready Markdown, reducing tokens up to 65%.125MIT
Related MCP Connectors
Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.
Converts any URL to clean, LLM-ready Markdown using real Chrome browsers
The document publishing layer for AI tools. Convert markdown to 6 destinations, 62 templates.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HEMANT16/pdftomarkdown'
If you have feedback or need assistance with the MCP directory API, please join our Discord server