# Unstructured

> Open-source library plus hosted Unstructured Pipelines and API that turn messy documents — PDF, HTML, docx, images, email — into clean, chunked JSON for RAG.

Unstructured preprocesses messy documents — PDF, HTML, docx, images, email — into clean, chunked JSON for RAG. It ships as an Apache-2.0 Python library and the hosted Unstructured Pipelines platform and 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, now called **Unstructured Pipelines**, and the Unstructured API layer 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 + Pipelines/API** — Apache-2.0 library for local use, plus the managed Unstructured Pipelines platform and 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 Unstructured Pipelines platform and API are 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/concepts/how-rag-works) and [best RAG frameworks 2026](/guides/comparisons/best-rag-frameworks-2026) for where ingestion fits, and pair it with a [chunking strategy optimizer](/skills/data/chunking-strategy-optimizer) once documents are parsed.

---

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