Python library that uses LLMs to turn PDFs, images and other documents into validated Pydantic objects, with classification and splitting.
Unstructured-IO/unstructured
Open-source Python library that partitions PDFs, HTML, Word, emails and other documents into structured elements for LLM pipelines.
- Stars
- 15,696
- Forks
- 1,385
- Open issues
- 340
- Last commit
- 23 hours ago
What is it?
Unstructured is an open-source Python library for ingesting and pre-processing image and text documents such as PDFs, HTML pages, Word files and emails. Its partition functions detect the file type and convert the content into a list of typed elements (titles, paragraphs, tables and so on), which are easier to feed into language models and retrieval systems than raw text.
The library provides a generic partition() entry point that routes each file to a format-specific function, and supports installing only the extras needed for particular document types. Optional system dependencies such as tesseract for OCR, poppler for PDFs and libreoffice for MS Office files are required for some formats. Telemetry is sent by default but can be disabled with the DO_NOT_TRACK or SCARF_NO_ANALYTICS environment variables.
The project also offers a hosted Transform v2 API for higher-quality output, but the open-source library is maintained as a free component.
Key features
- 01Partitions PDFs, HTML, Word, emails and other formats into typed document elements.
- 02Auto-detects file type and routes files to format-specific partitioning functions.
- 03Supports OCR for images and scanned PDFs through tesseract.
- 04Installs per document type via optional extras to keep dependencies small.
- 05Can be run in a Docker container with multi-platform images.
Use cases
- Preparing enterprise documents as clean text chunks for retrieval-augmented generation.
- Extracting tables and titles from PDFs for downstream data analysis.
- Converting email and Office files into structured JSON for ingestion pipelines.
Quick start
- 1
Pull the Docker image
docker pull downloads.unstructured.io/unstructured-io/unstructured:latest - 2
Start a container from the image
docker run -dt --name unstructured downloads.unstructured.io/unstructured-io/unstructured:latest - 3
Install the Python SDK with all document types
pip install "unstructured[all-docs]" - 4
Partition a sample email file in Python
Things to know
- Some document types need system packages such as tesseract-ocr, poppler-utils or libreoffice.
- Higher-quality output is offered only through the paid Transform v2 API.
In collections
Topics
FAQ
- What is unstructured?
- Open-source Python library that partitions PDFs, HTML, Word, emails and other documents into structured elements for LLM pipelines. Unstructured is an open-source Python library for ingesting and pre-processing image and text documents such as PDFs, HTML pages, Word files and emails. Its partition functions detect the file type and convert the content into a list of typed elements (titles, paragraphs, tables and so on), which are easier to feed into language models and retrieval systems than raw text.
- Is unstructured free to use? What license does it have?
- unstructured is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is unstructured still maintained?
- Actively maintained. The last commit to unstructured was on Nov 6, 2026.
- What can I use unstructured for?
- Preparing enterprise documents as clean text chunks for retrieval-augmented generation. Extracting tables and titles from PDFs for downstream data analysis. Converting email and Office files into structured JSON for ingestion pipelines.
- How do I install unstructured?
- Pull the Docker image: docker pull downloads.unstructured.io/unstructured-io/unstructured:latest Start a container from the image: docker run -dt --name unstructured downloads.unstructured.io/unstructured-io/unstructured:latest Install the Python SDK with all document types: pip install "unstructured[all-docs]" Partition a sample email file in Python
- Where can I get unstructured?
- The source code and installation instructions are on GitHub: https://github.com/Unstructured-IO/unstructured
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source document parser that converts PDFs, Office files and images into Markdown or JSON for LLM and agent workflows.
Open-source document parser that converts PDF, Office, HTML and other files into structured data for generative AI pipelines.
A document parser that converts PDF, Word, PowerPoint, Excel and CSV files into LLM-ready text while aiming to keep content intact.
Self-hosted document intelligence API that turns PDFs, Office files and images into LLM-ready chunks with layout analysis and OCR.
Baidu's open-source vision-language OCR model that parses long, multi-page documents and PDFs into structured text in one pass.