Open source · Apache-2.0 · 100% local

Documents in.
Fewer tokens out.

Turn PDFs, Office files and images into token-lean Markdown for your LLM. Lossless boosters drop the repeats, not the content.

npx distill-llm
−68%Claude reads our 5 demo PDFs for 98.3k tokens. As distill Markdown: 31.0k.

Opens a local app at 127.0.0.1:4321. Nothing leaves your machine.

How it works

Four small steps. All on your machine.

  1. 01

    Drop

    PDF, DOCX, PPTX, XLSX, ODF or an image.

  2. 02

    LiteParse

    Parses the layout into Markdown, with OCR for scans.

  3. 03

    Boosters

    Small, deterministic passes trim boilerplate, link targets and whitespace.

  4. 04

    Fewer tokens

    Copy or download lean Markdown, with the count before and after.

The app

See the saving before you paste.

Every file shows tokens before and after. Switch to the detailed view to toggle each booster and read the Markdown.

Compact view: four PDFs with token counts before and after, and the total saving
Compact view
Detailed view: individual boosters and the converted Markdown
Detailed view, each booster on its own switch
Markdown preview of a converted document
Markdown preview

Measured

What Claude actually pays to read your PDFs.

We counted the input tokens Claude needs for the five demo PDFs, once as the raw PDF and once as distill's Markdown. Your files will differ: headers, footers and links repeat more in some documents than in others.

−68% 98.3k → 31.0k Claude tokens
raw PDF vs distill Markdown, 5 PDFs
  • vendor-contract.pdf14.0k → 2.8k−80%
  • product-roadmap.pdf16.5k → 3.9k−77%
  • q3-financial-report.pdf25.0k → 6.4k−75%
  • inventory-export.pdf24.1k → 9.9k−59%
  • sales-ledger.pdf18.7k → 8.1k−57%

Measured with Anthropic's token counting API (claude-sonnet-5-5) on 5 demo PDFs. Your files will differ.

Lossless boosters, on top

−10% 24.9k → 22.4k tokens
o200k_base, 5 of 5 files

LiteParse already returns fairly clean Markdown, so lossless savings are typically modest and bigger on table- and link-heavy documents. LLMLingua-2 (optional, lossy) goes further.

Boosters

Formatting goes. Content stays.

Each booster is a pure, idempotent function over the Markdown, run in a fixed order. None of them touches code blocks or front-matter. The first four are on by default.

BoosterWhat it doesLoss
Drop repeated boilerplateRemoves repeated running headers and footers and bare page indicators such as Page 3 of 12, keeping the first. Short repeated lines are never removed.No information lost
Slim images and links![alt](path) becomes [alt] and [text](url) becomes text.Drops image paths and URLs
Compact tablesRemoves alignment padding from GFM tables.None
Collapse whitespaceCollapses blank-line runs, trailing spaces and double spaces outside code.None
LLMLingua-2A local model removes low-value words. Optional, experimental, off by default.Lossy

Desktop app

Download the desktop app.

Drop files into a window, no terminal needed. Lite has everything except LLMLingua-2; Full bundles its runtime.

Always the latest release. All releases. macOS builds are signed and notarized.

Use it everywhere

One engine, seven doors.

The same local pipeline behind a web app, a desktop app, a container, a CLI, an MCP server and hooks for your coding agent.

Start the local web app. It opens at http://127.0.0.1:4321.

npx distill-llm

Privacy

Your documents never leave.

  • Parsed locally

    Files are parsed on your machine and deleted from the temp directory after parsing.

  • No telemetry

    No analytics, no tracking. This page loads no third-party scripts either.

  • No CDN

    Fonts and assets are bundled, in the app and on this site.

  • Loopback by default

    The server only listens on 127.0.0.1 unless you say otherwise.

Up to three one-time downloads can happen, each only when you need it: OCR language data on first image OCR (about 15 MB, bundled in Docker and the desktop app), and, if you enable LLMLingua-2, its runtime from npm and its model (about 57 MB) from Hugging Face.

FAQ

Quick answers.

Is it free?

Yes. distill is open source under the Apache-2.0 license.

Does anything leave my machine?

No. Files are parsed locally, with no telemetry and no CDN. The only network use is the optional one-time downloads described above (OCR data, and the LLMLingua-2 runtime and model if you turn it on).

Which formats are supported?

PDF and images (PNG, JPG, TIFF, WebP, with built-in OCR) need nothing else. DOCX, PPTX, XLSX and ODF need LibreOffice on your PATH, which the Docker image already includes. Parsing quality is whatever LiteParse gives you, and it varies on dense tables and complex scans.

How are tokens counted?

With the o200k_base encoding, in your browser. Other models, such as Claude or Gemini, tokenize differently, so absolute counts are approximate. The percentage saved is comparable across tokenizers.

Is LLMLingua-2 lossy?

Yes. A local model removes low-value words, so it is marked as lossy, experimental and off by default. The default boosters drop only formatting, repeats and link targets.

Documents in. Fewer tokens out.

npx distill-llm