# EJS: 7.1 out of 10

A strong pick. 2nd of 8 in [Template engines](https://elestia.ai/opensource/templates/index.md).

EJS is the most widely used JavaScript template engine. It embeds plain JavaScript in HTML through angle-percent tags. It is a safe, familiar pick for Express-style server rendering and is actively maintained again, but Eta does the same job faster, with built-in types and fewer parsing quirks.

**Best for:** Node/Express projects that want the simplest, most widely known HTML templating with plain JavaScript inside templates.

## Scores

- **Overall: 7.1** (likely 6.1 to 8.1)
  - Claude Opus 5.5 (6.5): EJS remains a solid, well-understood choice with active maintenance and the biggest user base in the category. Eta keeps nearly the same syntax but is faster, ships types and is growing much faster. For new work, EJS is a reasonable pick rather than the clear best. Recent major-version churn and a weak Scorecard keep it from the top tier.
  - GPT-6.2 Sol (7.7): EJS is a strong pick for straightforward Express views because it offers direct integration, familiar JavaScript, and active maintenance. Eta has an edge when a new project needs built-in layouts and bundled types. Adoption is still large but losing ground against the catalog baseline, and maintenance concentrated around one person limits confidence over two years.
- **Needed by many: 4.8** (likely 3.7 to 6.0)
  - Claude Opus 5.5 (5.0): Server-side HTML templating is a common but shrinking need now that most new web apps render through component frameworks. EJS is general purpose and not tied to one framework, so it covers the whole category. It is used for HTML pages, emails, code generators and scaffolding tools.
  - GPT-6.2 Sol (4.6): EJS serves teams that render HTML or generate text on the server, and it works outside Express. Express is widely used, but API-only servers and apps with framework-provided rendering often have little need for a separate template engine. The available survey data tracks frameworks, so the share of developers who need EJS-style templates is uncertain.
- **Helps a lot: 6.9** (likely 5.8 to 7.9)
  - Claude Opus 5.5 (6.0): It does the core job well: it escapes output by default, supports includes, caching, custom delimiters, async and client builds, and it is very familiar to AI agents. It has clear limits: no bundled types, no layout or block inheritance, known parsing quirks, and it is roughly 4x slower than Eta in an independent benchmark. Eta offers the same syntax with more features.
  - GPT-6.2 Sol (7.7): Plain JavaScript, documented tags and includes, and compiled-template caching make everyday views easy to write. EJS leaves layouts to partials or add-ons and relies on external TypeScript declarations, while Eta ships types and built-in layout blocks. An independent benchmark used EJS 3.1.10, so it offers limited evidence about v7.0.2 performance. The docs give coding agents clear examples, but their accuracy on v7 is unmeasured.
- **Holds up over time: 6.9** (likely 5.5 to 8.2)
  - Claude Opus 5.5 (6.5): Activity is healthy: 55 commits, 6 releases, the latest in October 2026, and only 6 open issues. The work rests mostly on one long-time maintainer with no visible funding. Four majors in a year with late release notes show some churn risk. Its huge installed base makes abandonment unlikely to go unnoticed.
  - GPT-6.2 Sol (7.2): EJS logged 55 commits and six releases in the past year, ahead of Handlebars and Pug on commit activity. A user got a same-day answer when the v5 changes were unclear, and v7 now documents migration steps for Express and CLI users. Recent release work centers on one maintainer, and release access and funding are unclear, which widens the two-year estimate.
- **Used widely: 8.4** (likely 7.3 to 9.2)
  - Claude Opus 5.5 (8.5): It leads the category with about 240M downloads per 4 weeks and 1.53M dependent repositories, more than Handlebars. Many of those downloads come through tooling and generators. Its growth ratio of 2.67 is below the 4.1 median and far below Eta's 8.1, so it is losing share of new choices.
  - GPT-6.2 Sol (8.2): Ecosyste.ms tracks 1.53 million dependent repositories, the most in the peer set, even though EJS has fewer stars than Handlebars and Pug. Four-week downloads rose from 89.6 million to 239.6 million, or 2.67×, below the 4.1× catalog baseline and behind every listed peer except Handlebars. Automated installs and dependencies pulled in by other tools make it hard to tell how many new projects choose EJS directly.
- **Vouched for: 6.6** (likely 5.2 to 7.9)
  - Claude Opus 5.5 (6.0): Many tools build on it, such as Express view setups, scaffolding generators, and Eleventy support. Independent guides keep recommending it for Express apps. There is no current survey data and almost no social discussion, so most of its validation comes from long-standing use rather than fresh endorsements.
  - GPT-6.2 Sol (7.1): Express documents first-class support, Sails uses EJS by default, and Fastify's official view plugin supports it. Yeoman uses EJS 7 in development, while Eleventy's optional plugin still documents EJS 3. Independent evidence about production use and developer satisfaction specifically on v7 is limited.
- **Safe: 6.6** (likely 5.3 to 7.7)
  - Claude Opus 5.5 (6.5): It has zero dependencies, an Apache-2.0 licence, no advisories in 24 months, and a v6 prototype-pollution mitigation that is on by default. Older versions had critical RCE and template-injection advisories, and the engine executes JavaScript by design. The Scorecard is weak at 4.1, with no code review, no branch protection, no signed releases, and unpinned dependencies.
  - GPT-6.2 Sol (6.7): EJS has zero runtime dependencies and a permissive Apache-2.0 license. The two most recent advisories have fixes in older releases, and the bundle records no advisories in the past 24 months. EJS runs templates as JavaScript, so templates must come from trusted authors. GitHub releases use Actions, but npm publish access is unclear and Scorecard flags weak release signing, code review, branch protection, and workflow token permissions.

## Good

- The syntax is just HTML plus JavaScript, so developers and AI coding agents write correct templates right away.
- It has zero runtime dependencies, and v6 added a prototype-pollution mitigation that is on by default.
- It has the largest installed base in its category, with about 1.5M dependent repositories, and it plugs straight into Express and many static site generators.
- Development is active again: 55 commits and 6 releases in the last year, plus cleaner ESM/CJS packaging for Vite, Bun and Deno.

## Bad

- It shipped four major versions (v4 to v7) in about a year, and users had to ask for the v6 and v7 release notes, which arrived months late.
- It has no bundled TypeScript types; you need the separate @types/ejs package.
- It is several times slower than Eta in an independent 2026 benchmark, and it has known parsing quirks, such as a literal close tag inside a string breaking the template.
- There is no built-in layout or block inheritance, and nothing keeps heavy logic out of views.

## The numbers

- Downloads, 4 weeks: 240M
- In a year: ×2.7
- GitHub stars: 8.1k
- Commits, 12 months: 55
- Last npm release: Oct 2026
- Advisories, 24 months: 0
- Licence: Apache-2.0
- GitHub: https://github.com/mde/ejs
- npm: https://www.npmjs.com/package/ejs

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.
