# LiteParse

> A fast local document parser with a Rust core — Markdown, JSON or text with bounding boxes, no cloud

- Category: Retrieval & Knowledge (RAG) / Parsing & Ingestion
- Language: Rust
- Licence: Apache-2.0
- Repository: https://github.com/run-llama/liteparse
- Website: https://developers.llamaindex.ai/liteparse/
- Canonical page: https://ai-tldr.dev/tools/liteparse/
- Updated: 2026-05-27

## In short

LiteParse is LlamaIndex's standalone open-source document parser, built for one thing: fast, light, local parsing. It sits in the Parsing & Ingestion category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Rust and licensed Apache-2.0. To get started: install.

## Overview

LiteParse is LlamaIndex's standalone open-source document parser, built for one thing: fast, light, local parsing. It does spatial text extraction with PDFium, reconstructs the page layout on a grid, and emits Markdown, structured JSON or layout-preserved plain text — with bounding boxes for every piece of text. There are no proprietary LLM features and no cloud dependency; everything runs on your machine. PDF is the core format, and DOCX, XLSX, PPTX and images are converted in first.

OCR is selective rather than mandatory. Tesseract is bundled for zero-setup use, any OCR server (EasyOCR, PaddleOCR or your own) can be plugged in over a documented HTTP API, and OCR results are merged with the native text layer instead of replacing it. A complexity-detection pass tells you cheaply whether a document needs OCR or heavier parsing at all, so a pipeline can route, reject or cost-estimate a file before committing to a full parse. Page screenshots can be rendered for handing pages to a vision model.

The Rust core is wrapped for Node.js/TypeScript (napi-rs), Python (PyO3) and the browser (WASM), and every non-WASM install ships the same `lit` CLI, so the command shape is identical whichever ecosystem you install from. The Python and Node bindings add a worker-pool mode: parses run in persistent worker processes for real parallelism — PDFium otherwise serialises concurrent parses — with hard per-parse timeouts so a pathological document is killed by name instead of stalling the pipeline. LiteParse is Apache-2.0 and runs on Linux, macOS (Intel and Apple Silicon) and Windows; LlamaIndex points at its hosted LlamaParse for the hardest documents.

## What it does

- Spatial text parsing over PDFium with bounding boxes, plus grid-projection layout reconstruction
- Markdown, JSON and layout-preserved text output, with optional images, tables, links, annotations, form fields, vector graphics and tagged-PDF structure
- Selective OCR: bundled Tesseract, or any HTTP OCR server behind a documented API, merged with the native text layer
- Complexity detection to decide up front whether a document needs OCR or heavier parsing
- One `lit` CLI shared across the Rust, Python and Node installs, plus a WASM build for the browser
- Worker-pool mode (Python and Node) for true parallelism and hard per-parse timeouts

## Getting started

Install from whichever ecosystem you already use — all of them except WASM ship the same `lit` CLI.

1. Install

   Pick one. The Rust crate is available as both a CLI and a library.

```bash
npm i -g @llamaindex/liteparse     # Node.js / TypeScript
pip install liteparse               # Python
cargo install liteparse             # Rust CLI (cargo add liteparse for the library)
npm i @llamaindex/liteparse-wasm    # Browser (WASM)
```

2. Parse a document

   The default output is structured; --format picks what you get back.

```bash
lit parse document.pdf
lit parse document.pdf --format json -o output.json
```

3. Render Markdown for a RAG pipeline

   Markdown reconstruction rebuilds headings, tables, lists, images and links from the spatial layout — rule-based, so it stays fast.

```bash
lit parse document.pdf --format markdown -o output.md
```

4. Narrow the work

   Parse a page range, skip OCR entirely, or stream a remote file straight in.

```bash
lit parse document.pdf --target-pages "1-5,10,15-20"
lit parse document.pdf --no-ocr
curl -sL https://example.com/report.pdf | lit parse -
```

5. Pull images out alongside the text

   --extract-images is the only flag that enables embedded-image extraction; --image-output-dir requires it and writes the bytes to disk.

```bash
lit parse document.pdf --format markdown --image-mode embed \
  --extract-images --image-output-dir ./images
```

## When to use it

- Turn a corpus of PDFs and Office files into clean Markdown for a RAG index, entirely on your own machine
- Get bounding boxes for parsed text so citations can point back at a location on the page
- Screen a document with complexity detection and route only the hard ones to a heavier or hosted parser
- Parse at volume from Python or Node with a worker pool and per-document timeouts instead of a serialised loop

## Version history

- 2026-05-27 v2.0: LiteParse v2.0 replaced the TypeScript parser with a Rust core over a custom PDFium build, keeping the same CLI. LlamaIndex reported a 5–100× speedup on small documents and a 457-page PDF parsed in 0.777 seconds, with native, Python, Node and WASM builds shipping together.
