PEG.js Parser Generator

JSON →
library 0.10.0 ·javascript maintenance
verified May 27, 2026

PEG.js is a parser generator for JavaScript that produces fast parsers based on the Parsing Expression Grammar (PEG) formalism. It enables developers to define grammars for custom languages or complex data formats and generate a JavaScript parser function from them. The current stable version, 0.10.0, was released in August 2016. While the project's direct development on PEG.js itself has largely ceased, its successor, Peggy.js (npm: `peggy`), maintains API compatibility and active development. Key differentiators of PEG.js include its simple, expressive grammar syntax, excellent error reporting, and the ability to integrate both lexical and syntactical analysis into a single grammar. It can be used programmatically via a JavaScript API or through a command-line interface, generating parsers in multiple module formats like CommonJS (default), AMD, UMD, or global variables.

total hits 25
actors 9 distinct systems
last hit 1d ago human
Amazonbot
4
MetaBot
4
GPTBot
2
Script
2
ChatGPT-User
2
ClaudeBot
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇫🇷 France · 🇩🇪 Germany · 🇳🇴 Norway · 🇨🇦 Canada