https://txtfetch.com/
Any document in.
Clean text out.
PDFs, Office docs, HTML, email, EPUB, even scans, plus captions and tagged audio/video files. One HTTP endpoint turns any of it into clean text, Markdown, or element JSON. Built for LLM ingestion, RAG pipelines, and search indexing. No parsers to write, nothing to host.
1,000+ formats detected, checked → · OCR for scans · free tier stays free
Drop a file below. It stays in your browser.
Stays in your browser. Up to 25 MB.
What's not in this text:
Your browser read this file. No request left your browser, so txtfetch never received it. The API returns this same text as { status, extracted_text }.
the-problem
Every pipeline ends up with a parser zoo.
The document formats never stop coming. Each one grows its own library, its own edge cases, its own 2 a.m. failure mode. You wanted to build a product. Instead you're maintaining an extraction stack.
Delete the parser zoo. txtfetch collapses it into one call: Apache Tika and Tesseract OCR, run for you, behind an endpoint that always answers with text.
pdf-parse# chokes on scanned pagesmammoth# .docx only, loses tablescheerio# HTML only, you write the selectorsxlsx# one more dependency to patchmailparser# attachments are your problemtesseract.js# now you run OCR infra$ npm uninstall --all-of-it
see it, don't take our word for it
A scanned invoice with no text layer. Left is raw. Right is txtfetch.
One of the ten documents in our benchmark corpus, read on the premium tier. The corpus is a small, synthetic set of recorded fixtures. Differences are marked, not just colored, so this reads the same for a screen reader as it does on screen.
Scanned Invoice #9042 (image-only PDF)
raw parser output
lnvoice #9O42
Bill to: Northwind Tradcrs, 44 Harbor R0w
ltem Qty Unit Pricc Total Onsite installatlon 2 $45O.OO $9OO.OO Annual support pian 1 $1,2OO.OO $1,2OO.OO
Tota1 due: $2,1OO.OO
what txtfetch returns
# Invoice #9042
Bill to: Northwind Traders, 44 Harbor Row
| Item | Qty | Unit Price | Total |
| --- | --- | --- | --- |
| Onsite installation | 2 | $450.00 | $900.00 |
| Annual support plan | 1 | $1,200.00 | $1,200.00 |
Total due: $2,100.00
This scan has no text layer, so the standard tier's automatic Tesseract OCR escalation is what reads it at all. Tesseract reads most of the page, but confuses look-alike characters (O for 0, l and I for 1) throughout. It also has no table model, so the two-line item table survives only as one run-on blur. The premium tier reads the same image through a vision-language model and gets both the characters and the table right. See /fixes/pdf-extracts-no-text for the OCR-escalation path this document takes.
Table cell-F1 and reading order, standard vs. premium: 0.0% → 100.0%. See /benchmarks for the full methodology.
See all ten documents, including the two-column report and the table that loses a row →
how-it-works
Three steps. Two of them are ours.
Send anything
POST a file or pass a URL and txtfetch fetches it for you. PDF, DOCX, PPTX, XLSX, HTML, EPUB, email — 615 formats with a real parser behind them.
We detect & extract
Format detection, structure-aware parsing with Apache Tika, and Tesseract OCR when the document turns out to be pixels.
Get clean text
A JSON response with the document's plain text — ready to chunk, embed, index, classify, or archive. Nothing stored.
output
Text, Markdown, or element JSON — you pick.
Every request answers the same way. Pick the shape your pipeline wants: a flat string, GFM Markdown with real tables, or a typed element tree with page and offset per block.
format=text
Plain text
One flat string. Default, unchanged since day one.
format=markdown
Markdown
GFM headings, lists, and tables. Reading order preserved.
format=json
Element JSON
Typed heading/paragraph/list/table/image/code nodes.
formats
Every extension is a parser you don't write.
Most extraction tools stop at PDFs and scanned pages. txtfetch also handles email (.eml/.msg/.mbox), Office documents natively, EPUB, ODF, spreadsheets, archives, and caption/media files. It is one path for every file type, not just the ones that look like paper.
.pdf.docx.doc.pptx.ppt.xlsx.xls.csv.html.xml.epub.rtf.odt.ods.odp.md.eml.msg.mbox.txt.json.png.jpg.tiff.srt.vtt.mp4.mp3+ ~976 more
Apache Tika powers it: two decades of format archaeology, maintained by the people who wrote the book on it. Scans and images route through Tesseract OCR automatically.
Browse all 1,000+ formats →use-cases
Text is the universal interface.
RAG & LLM ingestion
Your retrieval is only as good as your extraction. Feed models clean text from any source your users throw at you — uploads, links, inboxes, archives.
chunk → embed → retrieve
Search indexing
Make every contract, deck, and attachment findable. One ingestion path for your whole document estate, OCR included.
extract → index → find
Document workflows
Classify inbound email, route invoices, screen resumes, mine archives. Anything you can do with text, you can now do with any file.
receive → extract → act
pricing
Priced per document, not per surprise.
Stop parsing. Start shipping.
Create an account and get an API key in minutes. The free Hobby plan needs no card.
Get started →