Open-source document parser that converts PDFs, Office files and images into Markdown or JSON for LLM and agent workflows.
The-Vibe-Company/megaparse
A document parser that converts PDF, Word, PowerPoint, Excel and CSV files into LLM-ready text while aiming to keep content intact.
- Stars
- 7,415
- Forks
- 417
- Open issues
- 34
- Last commit
- 6 days ago
What is it?
MegaParse is a Python library for parsing documents into a format suited to LLM ingestion. It handles text files, PDFs, PowerPoint presentations, Word documents, Excel spreadsheets and CSV files, and aims to preserve content during conversion.
The parser recognizes structural elements such as tables, table of contents, headers, footers and images. A separate MegaParse Vision mode uses a multimodal model (such as GPT-4o or Claude) to read pages as images, and the project also includes an API server that can be run locally.
Using the library requires Python 3.11 or newer. Depending on the file types, you also need system tools such as poppler and tesseract, plus an OpenAI or Anthropic API key for the vision mode.
Key features
- 01Parses PDF, Word, PowerPoint, Excel, CSV and text files.
- 02Preserves tables, table of contents, headers, footers and images.
- 03Offers a vision mode that uses multimodal LLMs to read pages.
- 04Can be run as a local API server with documented endpoints.
Use cases
- Preparing PDF or Office documents as input for retrieval-augmented generation pipelines.
- Extracting structured text and tables from presentations and reports for LLM processing.
- Building a document ingestion service that exposes parsing through an HTTP API.
Quick start
- 1
Install MegaParse with pip (Python 3.11 or newer)
pip install megaparse - 2
Add your OpenAI or Anthropic API key to the .env file
- 3
Install poppler and tesseract on your computer (needed for images and PDFs)
- 4
Parse a document with MegaParse in Python
Things to know
- Requires an OpenAI or Anthropic API key for its parsing features.
- Needs system tools poppler and tesseract installed separately, and libmagic on macOS.
- Requires Python 3.11 or newer.
Topics
FAQ
- What is megaparse?
- A document parser that converts PDF, Word, PowerPoint, Excel and CSV files into LLM-ready text while aiming to keep content intact. MegaParse is a Python library for parsing documents into a format suited to LLM ingestion. It handles text files, PDFs, PowerPoint presentations, Word documents, Excel spreadsheets and CSV files, and aims to preserve content during conversion.
- Is megaparse free to use? What license does it have?
- megaparse is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is megaparse still maintained?
- Actively maintained. The last commit to megaparse was on Oct 15, 2026.
- What can I use megaparse for?
- Preparing PDF or Office documents as input for retrieval-augmented generation pipelines. Extracting structured text and tables from presentations and reports for LLM processing. Building a document ingestion service that exposes parsing through an HTTP API.
- How do I install megaparse?
- Install MegaParse with pip (Python 3.11 or newer): pip install megaparse Add your OpenAI or Anthropic API key to the .env file Install poppler and tesseract on your computer (needed for images and PDFs) Parse a document with MegaParse in Python
- Where can I get megaparse?
- The source code and installation instructions are on GitHub: https://github.com/The-Vibe-Company/megaparse
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source document parser that converts PDF, Office, HTML and other files into structured data for generative AI pipelines.
Converts PDFs and other documents to markdown, JSON, chunks, or HTML, with optional LLM assistance for higher accuracy.
Python utility that converts PDFs, Office documents, HTML, images, audio and more into Markdown for LLM and text analysis pipelines.
All-in-one RAG framework for querying documents that mix text with images, tables, and equations, built on LightRAG.
Python library and web UI that converts PDFs, DOCX, PPTX, XLSX, images and URLs into Markdown, JSON, CSV or HTML, with OCR and structured field extraction.