Turn research PDFs into clean Markdown for LLMs.

grobid.rs converts PDFs to structured Markdown via GROBID TEI XML — entirely on your machine. Metadata lands in YAML frontmatter, sections and references stay intact, and nothing leaves your environment.

pdf → md
one command
0
cloud calls
resumable
skips finished files
pdf/ → md/ in one command
$ grobid
[INFO] Converting PDFs to Markdown via GROBID
[INFO] [1/2] PDF → TEI: paper.pdf
[INFO]   wrote paper.md
[INFO] Conversion completed

Features

A focused pipeline that turns messy PDFs into LLM-ready Markdown — with honest TEI XML as the intermediate format.

Local-first & private

GROBID runs in a Docker container on your machine. Your PDFs never leave your environment — safe for unpublished research and sensitive documents.

One command

Drop PDFs into a pdf/ directory and run grobid. A single Rust binary orchestrates the whole pdf/ → tei/ → md/ pipeline.

Rich metadata

Title, authors, year, journal, volume/issue/pages, and DOI are extracted into YAML frontmatter — ready for search, citation, and RAG pipelines.

Resumable

Already-converted TEI XML and Markdown files are skipped, so interrupted or repeated runs pick up exactly where they left off.

Structure preserved

Headings, paragraphs, lists, tables, formulas, figures, and the reference list are rendered faithfully — no flat wall of text.

Auto-starts GROBID

If the GROBID service is not running, the CLI launches the official Docker image on port 8070 and waits until it is ready.

See it in action

One command converts every PDF in pdf/ — TEI XML lands in tei/ and Markdown with frontmatter lands in md/.

Convert a folder of PDFs
$ grobid
[INFO] Converting PDFs to Markdown via GROBID
[INFO] Processing 2 file(s) with 2 concurrent request(s)
[INFO] [1/2] PDF → TEI: paper.pdf
[INFO]   wrote paper.tei.xml
[INFO] [1/2] TEI → MD: paper.tei.xml
[INFO]   wrote paper.md
[INFO] Conversion completed
Custom data directory
$ GROBID_DATA_DIR=~/papers grobid
[INFO] PDF dir: /Users/you/papers/pdf
[INFO] MD dir: /Users/you/papers/md
Version
$ grobid --version
grobid 0.0.1 (build 2026.11.07.23.10.04)

How the CLI works

A three-step local pipeline: PDFs in, structured Markdown out.

01

Drop in PDFs

Put your PDFs into a pdf/ directory — or point GROBID_DATA_DIR anywhere else. The CLI auto-creates pdf/, tei/, and md/ on first run.

pdf/ ← your papers
02

Run grobid

The CLI starts the GROBID Docker container if needed, then calls processFulltextDocument for each PDF and writes the TEI XML to tei/.

grobid # starts GROBID on :8070 if required
03

Get Markdown

TEI is rendered to clean Markdown — headings, lists, tables, formulas, figures, and references — with metadata in YAML frontmatter.

md/ → paper.md

Get started

Grab the prebuilt binary from GitHub Releases, or build from source with Cargo. Docker is only needed for the GROBID service, which the CLI can start for you. Requires Docker; Rust 1.85+ for source builds.

Install
$ curl -fsSL https://raw.githubusercontent.com/hieudoanm/grobid.rs/master/scripts/install.sh | bash
Installed to ~/.local/bin/grobid
$ mkdir -p pdf && cp paper.pdf pdf/
$ grobid
md/paper.md

Or build from source: ./scripts/install-local.sh — see the README for details.