# JavaScript parsers and codemods

Read JavaScript and TypeScript code as a tree, and change it with code. Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.

| Rank | Project | Overall | Needed by many | Helps a lot | Holds up over time | Used widely | Vouched for | Safe | Best for |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | [Babel parser](https://elestia.ai/opensource/parsers/babel-parser/index.md) | 8.0 | 4.4 | 8.4 | 7.4 | 8.1 | 8.1 | 8.1 | Authors of codemods, build plugins and dev tools who want the widest syntax support and a mature JavaScript-native AST toolkit. |
| 2 | [Oxc parser](https://elestia.ai/opensource/parsers/oxc-parser/index.md) | 7.8 | 4.7 | 7.8 | 8.4 | 6.2 | 8.1 | 8.2 | Build tools, linters and analysis scripts that need to parse lots of JS/TS fast into an ESTree-shaped tree. |
| 3 | [ast-grep](https://elestia.ai/opensource/parsers/ast-grep/index.md) | 7.5 | 4.8 | 7.6 | 7.3 | 4.7 | 6.8 | 7.7 | Teams and coding agents that want fast, pattern-based search, lint rules and rewrites across large or multi-language codebases. |
| 4 | [Acorn](https://elestia.ai/opensource/parsers/acorn/index.md) | 7.1 | 4.4 | 7.2 | 7.2 | 7.4 | 8.0 | 7.6 | Tool authors who need a light, dependency-free ESTree parser for plain JavaScript that runs anywhere JS runs. |
| 5 | [Recast](https://elestia.ai/opensource/parsers/recast/index.md) | 7.1 | 4.3 | 7.1 | 6.5 | 6.7 | 7.2 | 7.4 | Authors of codemod frameworks, CLIs and build plugins who must edit users' source files and keep their formatting and comments. |
| 6 | [ts-morph](https://elestia.ai/opensource/parsers/ts-morph/index.md) | 7.0 | 4.1 | 7.9 | 5.5 | 5.7 | 6.5 | 6.5 | Developers writing type-aware TypeScript refactors, code generators or analysis tools that need symbols, references and types, not just syntax. |
| 7 | [jscodeshift](https://elestia.ai/opensource/parsers/jscodeshift/index.md) | 6.4 | 4.2 | 6.9 | 5.0 | 6.2 | 7.0 | 7.0 | Teams writing syntax-level migration codemods in JavaScript that need small, format-preserving diffs and want a mature, well-documented pattern. |
| 8 | [Meriyah](https://elestia.ai/opensource/parsers/meriyah/index.md) | 6.3 | 3.4 | 6.7 | 6.9 | 4.5 | 5.5 | 7.8 | Tool authors who need a fast, zero-dependency ESTree parser for plain JavaScript or JSX, with no TypeScript. |
| 9 | [Esprima](https://elestia.ai/opensource/parsers/esprima/index.md) | 2.4 | 3.1 | 3.0 | 1.2 | 5.2 | 3.4 | 5.5 | Only legacy codebases that already depend on it and parse code no newer than ES2017. |

## The numbers

| Project | Downloads, 4 weeks | In a year | GitHub stars | Commits, 12 months | Last npm release | Advisories, 24 months |
| --- | --- | --- | --- | --- | --- | --- |
| Babel parser | 1.5B | ×3.8 | 44k | 618 | Nov 2026 | 0 |
| Oxc parser | 403M | ×80 | 24k | 9.1k | Nov 2026 | 0 |
| ast-grep | 23M | ×8.9 | 17k | 698 | Nov 2026 | 0 |
| Acorn | 1.3B | ×2.7 | 11k | 49 | Oct 2026 | 0 |
| Recast | 240M | ×3.7 | 5.3k | 81 | Nov 2026 | 0 |
| ts-morph | 174M | ×6.7 | 6.2k | 18 | Apr 2026 | 0 |
| jscodeshift | 32M | +47% | 10k | 15 | Jul 2026 | 0 |
| Meriyah | 50M | ×24 | 1.2k | 179 | Nov 2026 | 0 |
| Esprima | 608M | ×2.3 | 7.1k | 0 | Jul 2018 | 0 |

All categories: https://elestia.ai/opensource/index.md
