Skip to content
Skills Library
Documents & office · Conversion & formats

markitdown-convert

/markitdown-convert

Convert any file to Markdown using Microsoft MarkItDown. Use this skill whenever the user needs to extract text from PDFs, Word documents, Excel spreadsheets, PowerPoints, EPUBs, images, audio, HTML pages, CSV, JSON, XML, ZIP archives, Jupyter notebooks, Outlook .msg files, or any other document format. Also use it when the user asks to "convert to markdown", "extract text from", "read this file as text", or mentions specific file formats they want turned into readable markdown. This skill runs in the conda jarvis environment with markitdown v0.1.6b2.

Licence
MIT
Last repository change
12.06.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 12.06.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Convert any file to Markdown using Microsoft MarkItDown. Use this skill whenever the user needs to extract text from PDFs, Word documents, Excel spreadsheets, PowerPoints, EPUBs, images, audio, HTML pages, CSV, JSON, XML, ZIP archives, Jupyter notebooks, Outlook .msg files, or any other document format. Also use it when the user asks to "convert to markdown", "extract text from", "read this file as text", or mentions specific file formats they want turned into readable markdown. This skill runs in the conda jarvis environment with markitdown v0.1.6b2.

Triggers from the description

convert to markdownextract text fromread this file as text
Original author description

Convert any file to Markdown using Microsoft MarkItDown. Use this skill whenever the user needs to extract text from PDFs, Word documents, Excel spreadsheets, PowerPoints, EPUBs, images, audio, HTML pages, CSV, JSON, XML, ZIP archives, Jupyter notebooks, Outlook .msg files, or any other document format. Also use it when the user asks to "convert to markdown", "extract text from", "read this file as text", or mentions specific file formats they want turned into readable markdown. This skill runs in the conda jarvis environment with markitdown v0.1.6b2.

How it works

  1. 快速决策表
  2. CLI 用法
  3. Python API 用法
  4. 内置支持的格式
  5. 输出处理
  6. 注意事项
Original SKILL.md headings · 134 lines, 405 words
SKILL.md preview
---
name: markitdown-convert
description: Convert any file to Markdown using Microsoft MarkItDown. Use this skill whenever the user needs to extract text from PDFs, Word documents, Excel spreadsheets, PowerPoints, EPUBs, images, audio, HTML pages, CSV, JSON, XML, ZIP archives, Jupyter notebooks, Outlook .msg files, or any other document format. Also use it when the user asks to "convert to markdown", "extract text from", "read this file as text", or mentions specific file formats they want turned into readable markdown. This skill runs in the conda jarvis environment with markitdown v0.1.6b2.
---

# MarkItDown 文件转换

使用 Microsoft MarkItDown 将任意文件格式转换为 Markdown 文本。MarkItDown 已安装在 conda `jarvis` 环境(Python 3.12, markitdown v0.1.6b2)。

所有命令通过 `conda run -n jarvis` 执行。

## 快速决策表

| 用户需求 | 使用方式 |
|---------|---------|
| 快速转换一个本地文件 | CLI: `markitdown <file> -o output.md` |
| 转换后直接读入上下文 | CLI 输出到 stdout,捕获结果 |
| 批量转换多个文件 | Python API 循环 |
| 图片/音频需要文字描述 | Python API + LLM client |
| 流式数据/无文件路径 | Python API `convert_stream()` |
| URL 指向的文件 | Python API `convert_uri()` 或 CLI 管道 |

## CLI 用法

环境前缀:`conda run -n jarvis markitdown ...`

```bash
# 基本转换(输出到 stdout)
conda run -n jarvis markitdown "path/to/file.pdf"

# 保存到文件
conda run -n jarvis markitdown "path/to/file.pdf" -o output.md

# 管道输入
cat file.pdf | conda run -n jarvis markitdown

# 从 stdin 读取时指定格式
cat data.bin | conda run -n jarvis markitdown -x pdf
conda run -n jarvis markitdown -m application/pdf < data.bin

# 指定编码
conda run -n jarvis markitdown -c UTF-8 file.csv

# 查看已安装的第三方插件
conda run -n jarvis markitdown --list-plugins

# 使用第三方插件
conda run -n jarvis markitdown --use-plugins file.pdf

# 保留 base64 图片 data URI(默认会截断)
conda run -n jarvis markitdown --keep-data-uris file.html
```

## Python API 用法

执行脚本时写入临时 `.py` 文件然后运行(避免 conda run 内联脚本的换行问题):

```bash
conda run -n jarvis python /path/to/temp_script.py
```

### 核心入口:convert()

智能分发,根据参数类型自动选择处理路径:

```python
from markitdown import MarkItDown

md = MarkItDown()

# 自动判断类型
result = md.convert("document.pdf")        # 本地文件
result = md.convert("https://example.com/") # URL
result = md.convert(response)               # requests.Response
result = md.convert(binary_stream)          # BinaryIO

print(result.text_content)  # Markdown 字符串
```

### 精确方法(推荐)

```python
# 本地文件
md.convert_local("/path/to/file.xlsx")

# 二进制流(需提示格式)
from markitdown import StreamInfo
md.convert_stream(io.BytesIO(raw_bytes),
    stream_info=StreamInfo(extension=".pdf"))

# HTTP 响应
import requests
r = requests.get(url, stream=True)
md.convert_response(r)

# URI(支持 http/https/file/data)
md.convert_uri("https://arxiv.org/pdf/2301.00001.pdf")
md.convert_uri("file:///C:/Users/me/data.csv")
```

### LLM 集成(图片/音频描述)

```python
from openai import OpenAI
from markitdown import MarkItDown

client = OpenAI()
md = MarkItDown(llm_client=client, llm_model="gpt-4o")
result = md.convert("photo.jpg")
```

## 内置支持的格式

| 类别 | 格式 |
|------|------|
| 文档 | PDF, DOCX, PPTX, XLSX, XLS |
| 电子书 | EPUB |
| 图片 | 各图片格式(需 LLM 才有文字描述) |
| 音频 | 各音频格式(需 LLM) |
| 网页 | HTML, Wikipedia, YouTube, RSS |
| 数据 | CSV, JSON(via text), XML(via text) |
| 代码 | Jupyter Notebook (.ipynb) |
| 邮件 | Outlook .msg |
| 压缩 | ZIP(递归解压并转换内部文件) |
| 纯文本 | 所有纯文本格式(兜底) |

## 输出处理

`DocumentConverterResult` 对象包含:
- `result.text_content` — Markdown 文本(已规范化:统一换行、合并多余空行)
- `result.title` — 可选标题

## 注意事项

- 优先使用 `convert_local()` 而非 `convert()` 处理本地文件(安全,避免被误解析为 URL)
- 当前环境无第三方插件,可通过 `pip install markitdown-ocr` 安装 OCR 插件
- HTTP 请求默认 Accept 头为 `text/markdown`,利用支持 Markdown 输出的服务

Versions

The database has no other skills named markitdown-convert.

Database snapshot: 13.11.2026 · package version 270856317db5 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100markitdown
    Convert files, URLs, and documents to Markdown using the markitdown MCP server. Activate when the user asks to convert, extract, or read content from PDFs, Word docs, PowerPoints, spreadsheets, images, audio files, or any URL.
  • 100markdown-converter
    Convert documents and files to Markdown using markitdown. Use when converting PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx, .xls), HTML, CSV, JSON, XML, images (with EXIF/OCR), audio (with transcription), ZIP archives, YouTube URLs, or EPubs to Markdown format for LLM…
  • 100markitdown-skill
    Convert documents to Markdown using Microsoft's MarkItDown CLI (`markitdown`). Supports PDF, Word, PowerPoint, Excel, images (OCR), audio (transcription), HTML, YouTube, and URLs. Use when a user wants to convert a file or URL to Markdown, extract text from PDFs/images,…
  • 100markitdown
    Converts PDF, Word, Excel, PowerPoint, HTML, CSV, EPUB, ZIP and other files into Markdown text that language models and search indexes can read. Use when a user asks to convert a document to Markdown, turn a PDF or DOCX into text for an LLM, export spreadsheet tables as…
  • 100markitdown
    Guide for using Microsoft MarkItDown - a Python utility for converting files to Markdown. Use when converting PDF, Word, PowerPoint, Excel, images, audio, HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs, Jupyter notebooks, RSS feeds, or Wikipedia pages to Markdown format. Also…
  • 100alterlab-markitdown
    Converts files and Office documents to clean, LLM-friendly Markdown with Microsoft MarkItDown (markitdown CLI, Python API, and markitdown-mcp server), supporting PDF, DOCX, PPTX, XLSX/XLS, images (EXIF metadata, LLM descriptions), audio (transcription), HTML, CSV, JSON, XML, ZIP…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.