+ MarkEverythingDown - 你的全能文档Markdown转换神器!🚀
一键将PDF/Office/图片/代码等文件转换为结构清晰的Markdown,专为LLM优化设计。结合Qwen2.5 VL视觉模型,连扫描件都能智能解析!
✅ AI超能力 - 深度集成Qwen2.5 VL模型,完美保留表情符号和图像描述
✅ 格式全覆盖 - 从微信截图到学术论文统统搞定
✅ 双模处理 - 本地/云端自由切换,隐私与性能兼得
✅ 小白友好 - 无需代码,拖拽文件立即转换
✅ 智能分批 - 优化处理大型PDF文档,自动调整批次大小
MarkEverythingDown is a versatile document conversion tool that transforms various file formats into clean, structured markdown. Whether you're working with PDFs, Office documents, images, code files, or notebooks, MarkEverythingDown provides a unified interface to convert them all.
The tool is specifically designed to leverage Qwen2.5 VL models through OpenAI-compatible APIs, supporting both local inference engines like LMStudio and cloud API providers like DashScope. This design enables high-quality processing of visual content while maintaining flexibility in deployment options.
I developed this tool to streamline the conversion of documents into markdown format, which is both LLM-friendly and easy for human to read. The goal is to make document processing as seamless as possible, allowing users to easily convert their files for RAG applications or SFT dataset preparations.
| Category | Formats |
|---|---|
| Documents | PDF, DOCX, PPTX, XLSX |
| Images | PNG, JPG, JPEG, BMP |
| Code | Python, R, and other programming languages |
| Notebooks | Jupyter Notebooks (ipynb) |
| Markdown | MD, RMD (R Markdown) |
| Text | TXT |
# Clone the repository
git clone https://github.com/RoffyS/MarkEverythingDown.git
cd MarkEverythingDown
# Set up a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Launch the web interface
python main.py --ui

The MarkEverythingDown web interface provides an intuitive way to convert your documents to markdown:
Pages Per Batch based on page complexity and token limitsMax Tokens: Set token limits for generation (blank uses model default)
API Configuration: Configure API settings for your vision model:
python main.py sample_pdf.pdf # path to input file \
--api-key lm_studio \
--base-url http://localhost:1234/v1 \
--model qwen2.5-vl-32b-instruct \
--force-vision \
--max-concurrent 1 \
--output test \
--images-per-batch 1 \
--dynamic-batching \
--max-tokens-per-batch 8192
| Option | Description | Default |
|---|---|---|
--output, -o |
Output directory for markdown files | output |
--ui |
Launch the graphical user interface | - |
--force-vision |
Use vision model for PDFs instead of text extraction | False |
--max-concurrent |
Maximum concurrent workers for PDF page processing | 2 |
--images-per-batch |
Maximum number of PDF pages per API call | 1 |
--dynamic-batching |
Automatically adjust images-per-batch based on page complexity and maximum tokens per batch | True |
--no-dynamic-batching |
Disable dynamic batching | - |
--max-tokens-per-batch |
Maximum tokens per batch for dynamic batching | 4000 |
--temperature |
Temperature for generation (0.0-1.0) | 0.0 |
--max-tokens |
Maximum tokens for generation | Model default |
--api-key |
API key for vision processor | lmstudio |
--base-url |
Base URL for API endpoint | http://localhost:1234/v1 |
--model |
Model name to use | qwen2.5-vl-7b-instruct |
Below are several examples of converting images, PDFs, and Office documents into markdown format. You are welcome to try it out with your own documents, either through the web UI or the command line. You can also play around with the prompt templates in processors/vision/vision_processor.py to customize the output format of PDFs and images.
Input: 
Output (test_output/test_image1.md):
# 2018 Turing Award for deep learning
The most prestigious technical award, given to individuals who have made major
contributions of lasting importance to computing.
## Recipients
- **Geoffrey Hinton**
- **Yoshua Bengio**
- **Yann LeCun**
## Lecture Details
- **Lecture 1 - Slide 27**
- **Date:** April 4, 2023
- **Presenters:** Fei-Fei Li, Yunzhu Li, Ruohan Gao
Input: 
Output (test_output/test_image3.md):
# Basic Data Types in R: Numeric
## Numeric: Default Data Type in R Representing Decimal Values
- **Numeric:** The default data type in R for representing decimal values.
- Assign a decimal value:
```R
x <- 3.14
```
- Print the value of `x`:
```R
x
# [1] 3.14
```
- Print the class name of `x`:
```R
class(x)
# [1] "numeric"
```
- Assign an integer value:
```R
k <- 3
```
- Print the value of `k`:
```R
k
# [1] 3
```
- Print the class name of `k`:
```R
class(k)
# [1] "numeric"
```
- Even integer values are stored as numeric unless explicitly declared:
```R
class(k)
# [1] "numeric"
```
- Check if `k` is an integer:
```R
is.integer(k)
# [1] FALSE
```
## Try it Yourself:
- [Link to Practice](https://campus.datacamp.com/courses/r-short-and-sweet/hello-r?ex=2)
Input: 
Output (test_output/test_image2.md):
# WeChat Transcript
**Sender:** User 1
> Can't believe I'm using a random WeChat history generator to create a test case
**Sender:** User 2
> Guess they will never know
**Sender:** User 1
> yea alright
Input: sample_pdf.pdf
Output (test_output/sample_pdf_noVision.md):
As you can tell, PDF is a really tricky format to process. The output is not very clean, and the formatting is not preserved.
```markdown
March 5, 2025 Qwen2.5-VL Technical Report Qwen Team, Alibaba Group https://chat.qwenlm.aihttps://huggingface.co/Qwen https://modelscope.cn/organization/qwenhttps://github.com/QwenLM/Qwen2.5-VL Abstract We introduce Qwen2.5-VL, the latest flagship model of Qwen vision-language series, which demonstrates significant advancements in both foundational capabilities and innovative functionalities. Qwen2.5-VL achieves a major leap forward in understanding and interacting with the world through enhanced visual recognition, precise object local- ization, robust document parsing, and long-video comprehension. A standout feature of Qwen2.5-VL is its ability to localize objects using bounding boxes or points accurately. It provides robust structured data extraction from invoices, forms, and tables, as well as detailed analysis of charts, diagrams, and layouts. To handle complex inputs, Qwen2.5- VL introduces dynamic resolution processing and absolute time encoding, enabling it to process images of varying sizes and videos of extended durations (up to hours) with second-level event localization. This allows the model to natively perceive spatial scales and temporal dynamics without relying on traditional normalization techniques. By training a native dynamic-resolution Vision Transformer (ViT) from scratch and incorpo- rating Window Attention, we have significantly reduced computational overhead while maintaining native resolution. As a result, Qwen2.5-VL excels not only in static image and document understanding but also as an interactive visual agent capable of reasoning, tool usage, and task execution in real-world scenarios such as operating computers and mobile devices. The model achieves strong generalization across domains without requir- ing task-specific fine-tuning. Qwen2.5-VL is available in three sizes, addressing diverse use cases from edge AI to high-performance computing. The flagship Qwen2.5-VL-72B model matches state-of-the-art models like GPT-4o and Claude 3.5 Sonnet, particularly excelling in document and diagram understanding. The smaller Qwen2.5-VL-7B and Qwen2.5-VL-3B models outperform comparable competitors, offering strong capabilities even in resource-constrained environments. Additionally, Qwen2.5-VL maintains robust linguistic performance, preserving the core language competencies of the Qwen2.5 LLM. 1arXiv:2502.13923v1 [cs.CV] 19 Feb 2025
1Introduction Large vision-language models ( LVLMs ) ( OpenAI ,2024;Anthropic ,2024a ;Team et al. ,2023;Wang et al. , 2024f ) represent a pivotal breakthrough in artificial intelligence, signaling a transformative approach to multimodal understanding and interaction. By seamlessly integrating visual perception with natural language processing, these advanced models are fundamentally reshaping how machines interpret and analyze complex information across diverse domains. Despite significant advancements in multimodal large language models, the current capabilities of these models can be likened to the middle layer of a sandwich cookie—competent across various tasks but falling short of exceptional performance. Fine- grained visual tasks form the foundational layer of this analogy. In this iteration of Qwen2.5-VL, we are committed to exploring fine-grained perception capabilities, aiming to establish a robust foundation for LVLMs and create an agentic amplifier for real-world applications. The top layer of this framework is multi-modal reasoning, which is enhanced by leveraging the latest Qwen2.5 LLM and employing multi-modal QA data construction. A spectrum of works have promoted the development of multimodal large models, characterized by architectural design, visual input processing, and data curation. One of the primary drivers of progress in LVLMs is the continuous innovation in architecture. The studies presented in ( Alayrac et al. ,2022; Li et al. ,2022a ;2023b ;Liu et al. ,2023b ;a;Wang et al. ,2024i ;Zhang et al. ,2024b ;Wang et al. ,2023) have incrementally shaped the current paradigm, which typically consists of a visual encoder, a cross-modal projector, and LLM. Fine-grained perception models have emerged as another crucial area. Models like (Xiao et al. ,2023;Liu et al. ,2023c ;Ren et al. ,2024;Zhang et al. ,2024a ;d;Peng et al. ,2023;Deitke et al. , 2024) have pushed the bound
$ claude mcp add MarkEverythingDown \
-- python -m otcore.mcp_server <graph>