Turn a PDF into JSONL chunks for RAG
Chunk a PDF for a knowledge base, with page numbers kept so answers can cite their source.
Processed on your deviceor drop a PDF anywhere on this page. Files stay on this device.
How to turn a PDF into JSONL chunks for RAG
To convert a PDF to JSONL for RAG, open it here, choose a chunk size and overlap in tokens, and press Make chunks. Puffin PDF reads the text in your browser, removes headers and footers, and cuts it at paragraph and sentence breaks into chunks of about that size. Each line holds an id, the source file name, the page numbers, a token estimate and the text, ready for an embedding model or vector database.
- Select a PDF, or drop it on this page.
- Choose a chunk size and overlap.
- Pick JSON Lines or a JSON array.
- Press Make chunks and download.
Questions and answers
What chunk size should I use?
Between 300 and 800 tokens with 10 percent overlap is a good start for most embedding models. Use larger chunks for long-form answers and smaller ones for precise lookups.
What does each line look like?
{"id":"report.pdf#1","source":"report.pdf","pages":[1],"tokens":480,"text":"…"}
Does it work on scanned PDFs?
A scan is a picture of a page, so it has no text to convert. Run OCR PDF on it first (also free and on your device), then convert the file OCR gives you.
Are my files uploaded?
No. The work is done by code running in your browser, so your file never leaves your device. You can check this yourself: open your browser's developer tools, switch to the Network tab and run the tool. No request carries your file.
Is it free? Are there limits?
Yes, it is free with no sign-up, no watermark and no daily limit. Because your own device does the work, it costs us almost nothing to run, so there is nothing to meter.