markitdown AI技能包 是 AI Skill Hub 本期精选AI工具之一。在 GitHub 上收获超过 123.1k 颗 Star,综合评分 8.8 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
微软开源的Python工具,将各类文件和Office文档智能转换为Markdown格式。支持PDF、Word、Excel、PowerPoint等多种格式,适合开发者、内容编辑和AI工程师快速处理文档数据。
markitdown AI技能包 是一款基于 Python 开发的开源工具,专注于 文档转换、Markdown、Office处理 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
微软开源的Python工具,将各类文件和Office文档智能转换为Markdown格式。支持PDF、Word、Excel、PowerPoint等多种格式,适合开发者、内容编辑和AI工程师快速处理文档数据。
markitdown AI技能包 是一款基于 Python 开发的开源工具,专注于 文档转换、Markdown、Office处理 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install markitdown
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install markitdown
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/microsoft/markitdown
cd markitdown
pip install -e .
# 验证安装
python -c "import markitdown; print('安装成功')"
# 命令行使用
markitdown --help
# 基本用法
markitdown input_file -o output_file
# Python 代码中调用
import markitdown
# 示例
result = markitdown.process("input")
print(result)
# markitdown 配置文件示例(config.yml) app: name: "markitdown" debug: false log_level: "INFO" # 运行时指定配置文件 markitdown --config config.yml # 或通过环境变量配置 export MARKITDOWN_API_KEY="your-key" export MARKITDOWN_OUTPUT_DIR="./output"
[!IMPORTANT] MarkItDown performs I/O with the privileges of the current process. Like open() or requests.get(), it will access resources that the process itself can access. Sanitize your inputs in untrusted environments, and call the narrowestconvert_*function needed for your use case (e.g.,convert_stream(), orconvert_local()). See the Security Considerations section of the documentation for more information.
MarkItDown is a lightweight Python utility for converting various files to Markdown for use with LLMs and related text analysis pipelines. To this end, it is most comparable to textract, but with a focus on preserving important document structure and content as Markdown (including: headings, lists, tables, links, etc.) While the output is often reasonably presentable and human-friendly, it is meant to be consumed by text analysis tools -- and may not be the best option for high-fidelity document conversions for human consumption.
MarkItDown currently supports the conversion from:
MarkItDown requires Python 3.10 or higher. It is recommended to use a virtual environment to avoid dependency conflicts.
With the standard Python installation, you can create and activate a virtual environment using the following commands:
python -m venv .venv
source .venv/bin/activate
If using uv, you can create a virtual environment with:
```bash uv venv --python=3.12 .venv source .venv/bin/activate
MarkItDown has optional dependencies for activating various file formats. Earlier in this document, we installed all optional dependencies with the [all] option. However, you can also install them individually for more control. For example:
pip install 'markitdown[pdf, docx, pptx]'
will install only the dependencies for PDF, DOCX, and PPTX files.
At the moment, the following optional dependencies are available:
[all] Installs all optional dependencies[pptx] Installs dependencies for PowerPoint files[docx] Installs dependencies for Word files[xlsx] Installs dependencies for Excel files[xls] Installs dependencies for older Excel files[pdf] Installs dependencies for PDF files[outlook] Installs dependencies for Outlook messages[az-doc-intel] Installs dependencies for Azure Document Intelligence[az-content-understanding] Installs dependencies for Azure Content Understanding[audio-transcription] Installs dependencies for audio transcription of wav and mp3 files[youtube-transcription] Installs dependencies for fetching YouTube video transcription
If you are using Anaconda, you can create a virtual environment with:
bash conda create -n markitdown python=3.12 conda activate markitdown ```
To install MarkItDown, use pip: pip install 'markitdown[all]'. Alternatively, you can install it from the source:
git clone git@github.com:microsoft/markitdown.git
cd markitdown
pip install -e 'packages/markitdown[all]'
docker build -t markitdown:latest .
docker run --rm -i markitdown:latest < ~/your-file.pdf > output.md
md = MarkItDown(cu_endpoint="<content_understanding_endpoint>") result = md.convert("report.pdf") # documents → prebuilt-documentSearch result = md.convert("meeting.mp4") # video → prebuilt-videoSearch result = md.convert("call.wav") # audio → prebuilt-audioSearch print(result.markdown)
**With a custom analyzer** (for domain-specific field extraction):
python md = MarkItDown( cu_endpoint="<content_understanding_endpoint>", cu_analyzer_id="my-invoice-analyzer", ) result = md.convert("invoice.pdf") print(result.markdown)
Basic usage in Python:
from markitdown import MarkItDown
md = MarkItDown(enable_plugins=False) # Set to True to enable plugins
result = md.convert("test.xlsx")
print(result.text_content)
Document Intelligence conversion in Python:
from markitdown import MarkItDown
md = MarkItDown(docintel_endpoint="<document_intelligence_endpoint>")
result = md.convert("test.pdf")
print(result.text_content)
To use Large Language Models for image descriptions (currently only for pptx and image files), provide llm_client and llm_model:
from markitdown import MarkItDown
from openai import OpenAI
client = OpenAI()
md = MarkItDown(llm_client=client, llm_model="gpt-4o", llm_prompt="optional custom prompt")
result = md.convert("example.jpg")
print(result.text_content)
MarkItDown also supports 3rd-party plugins. Plugins are disabled by default. To list installed plugins:
markitdown --list-plugins
To enable plugins use:
markitdown --use-plugins path-to-file.pdf
To find available plugins, search GitHub for the hashtag #markitdown-plugin. To develop a plugin, see packages/markitdown-sample-plugin.
The markitdown-ocr plugin adds OCR support to PDF, DOCX, PPTX, and XLSX converters, extracting text from embedded images using LLM Vision — the same llm_client / llm_model pattern that MarkItDown already uses for image descriptions. No new ML libraries or binary dependencies required.
Installation:
pip install markitdown-ocr
pip install openai # or any OpenAI-compatible client
Usage:
Pass the same llm_client and llm_model you would use for image descriptions:
from markitdown import MarkItDown
from openai import OpenAI
md = MarkItDown(
enable_plugins=True,
llm_client=OpenAI(),
llm_model="gpt-4o",
)
result = md.convert("document_with_images.pdf")
print(result.text_content)
If no llm_client is provided the plugin still loads, but OCR is silently skipped and the standard built-in converter is used instead.
See packages/markitdown-ocr/README.md for detailed documentation.
You can also contribute by creating and sharing 3rd party plugins. See packages/markitdown-sample-plugin for more details.
微软官方维护的高质量工具,与AutoGen和LangChain深度集成,文档转换效果好。是构建AI应用知识库的利器。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,markitdown AI技能包 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | markitdown |
| 原始描述 | 开源AI工具:Python tool for converting files and office documents to Markdown.。⭐123.1k · Python |
| Topics | 文档转换MarkdownOffice处理Python工具AutoGen扩展 |
| GitHub | https://github.com/microsoft/markitdown |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-14 · 更新时间:2026-05-16 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。