# Unstructured

> Open-source library plus hosted Platform/API that turns messy documents — PDF, HTML, docx, images, email — into clean, chunked JSON for LLMs and RAG.

Unstructured preprocesses messy documents — PDF, HTML, docx, images, email — into clean, chunked JSON ready for LLMs and RAG. It ships as an Apache-2.0 Python library and a hosted Platform/API with source and destination connectors, partitioning files into typed elements, then enriching, chunking, and embedding them as an ingestion ETL layer.

Website: https://unstructured.io

Unstructured is a **document preprocessing and ETL layer for LLMs**. Real-world source data — PDFs, HTML, Word and PowerPoint files, spreadsheets, scanned images, and email — is messy and inconsistent, and feeding it raw into a RAG pipeline produces poor retrieval. Unstructured partitions each file into typed elements (Title, NarrativeText, Table, ListItem, and more), applies OCR and layout detection where needed, and emits clean, structured JSON that downstream chunking and embedding can rely on.

It comes in two forms. The **open-source library** (`unstructured`, Apache-2.0) runs locally and handles partitioning across dozens of file types through a single `partition` entry point. The **hosted Platform/API** layers on source and destination connectors, enrichment, chunking, and embedding, so teams can build continuous ingestion pipelines from data sources into vector databases and warehouses without operating the infrastructure.

## Highlights

- **Many file types** — one pipeline for PDF (digital and scanned), HTML, DOCX, PPTX, XLSX, CSV, images, EML/MSG, EPUB, Markdown, and more.
- **OSS + Platform/API** — Apache-2.0 library for local use, plus a managed API with connectors and workflows.
- **RAG-ready output** — partition into typed elements, then chunk (e.g. by title) and serialize to JSON tuned for retrieval.
- **Connectors** — source and destination integrations for vector stores and data platforms like Pinecone, Weaviate, Databricks, Snowflake, and MongoDB.

## Good to know

Unstructured is freemium: the core library is free and self-hostable under Apache-2.0, while the hosted Platform/API is usage-based with a free tier and enterprise (dedicated/VPC) options. It sits at the start of a RAG stack — see [how RAG works](/guides/foundations/how-rag-works) and [best RAG frameworks 2026](/guides/foundations/best-rag-frameworks-2026) for where ingestion fits, and pair it with a [chunking strategy optimizer](/skills/rag-knowledge/chunking-strategy-optimizer) once documents are parsed.

---

_Source: https://agentscamp.com/tools/unstructured — Tool on AgentsCamp._
