Description
Parsel is a PHP library for extracting Markdown, plain text and structured data from documents. Its API is expressive and it ships with drivers for two command-line parsers, LiteParse and AnyDoc. You can register your own driver as well. Parsel requires PHP 8.4 or later and is installed with Composer. A separate installer command sets up the parser binary for the driver you plan to use, and by default that is LiteParse. You can choose a package manager with a manager option. LiteParse supports npm, pnpm, bun, pip and cargo, and AnyDoc supports npm, pnpm and bun and needs Node.js 20 or later. LiteParse uses LibreOffice to convert Office, OpenDocument, RTF and CSV files. Documents can be parsed from a path or raw bytes, and the output can be Markdown, text, or a structured document. Large files can be streamed one page at a time, and pages can be rendered to PNG screenshots. The save method writes the output in a format chosen by the file extension.…
Highlights
- Extracts Markdown, text and structured data from documents
- LiteParse and AnyDoc driver support
- Custom drivers can be registered
- Streams pages for large documents
- Renders pages to PNG screenshots
Ratings & Reviews
No ratings yet
Be the first to rate Parsel.
People also visit
Parsel FAQ
What is Parsel?
A PHP library that extracts Markdown, text and structured data from documents by calling parser command-line tools.
What does it need?
PHP 8.4 or later, installed with Composer, plus a parser binary. LiteParse needs LibreOffice for Office and other document formats.
Which parser should I use?
By default the installer sets up LiteParse. AnyDoc is the other built-in driver, and it needs Node.js 20 or later.
Can I add my own parser?
Yes. The README has a section on custom drivers for registering your own.
What are the best Parsel alternatives?
Popular alternatives to Parsel include Markedly. See all Parsel alternatives







