# Handlebars: 6.5 out of 10

Reasonable, with limits. 4th of 8 in [Template engines](https://elestia.ai/opensource/templates/index.md).

Handlebars is the classic logic-less, Mustache-style template engine with helpers and partials. It is mature, very widely installed and well known to AI agents, but it has seen little change since 2019 apart from security patches. In 2026 it needed two waves of fixes for critical code-injection bugs. It is a reasonable pick for emails and code generation. For new HTML rendering, Eta or LiquidJS are more actively developed.

**Best for:** Teams that want logic-less templates editable by non-developers, such as transactional emails, scaffolding or codegen, and that render only trusted template strings.

## Scores

- **Overall: 6.5** (likely 5.4 to 7.6)
  - Claude Opus 5.5 (5.5): Handlebars still works well for logic-less templating, and it remains a sensible pick for emails and codegen where its syntax is a standard. Its feature development has stopped and it is slower than Eta. In 2026 it had to fix critical injection flaws twice, and its growth is the weakest in the category. For new server-rendered HTML, a more active engine such as Eta or LiquidJS is the better default.
  - GPT-6.2 Sol (7.5): Handlebars is a strong pick for application-owned views, emails, and reports built from prepared data. EJS fits teams that want inline JavaScript, and LiquidJS fits teams that need asynchronous rendering. Slower relative adoption and the long gap between stable releases temper confidence in Handlebars as a default for new projects.
- **Needed by many: 5.1** (likely 4.1 to 6.2)
  - Claude Opus 5.5 (5.0): Server-side templating of HTML, email and text is a common need, but many web apps now render with React, Vue or Svelte SSR instead. Handlebars' logic-less style fits a sub-group: emails, scaffolding and codegen tools, and static content. It runs on Node and in browsers, so it is not tied to one runtime.
  - GPT-6.2 Sol (5.2): Standalone templates are useful for server-rendered sites, transactional email, reports, and generated text. Handlebars works across frameworks, though many web projects already use a framework with its own rendering system. Developer surveys give context on those frameworks, and the share of teams that need a separate template engine remains uncertain.
- **Helps a lot: 7.0** (likely 5.9 to 8.0)
  - Claude Opus 5.5 (6.0): It is mature and complete for logic-less templating, with helpers, partials, block helpers, precompilation and bundled types. AI agents write correct code for it easily. It is slower than Eta and EJS without precompilation. Any real logic has to go into helpers. Its compile() path has had repeated injection flaws when it gets non-string input.
  - GPT-6.2 Sol (7.9): Partials, block helpers, and precompilation cover most needs for server-rendered HTML and text, and the guide gives runnable examples. The bundled TypeScript declarations cover the JavaScript API, while missing template fields surface at render time in strict mode and otherwise can pass silently. Users report friction with simple comparisons, and asynchronous work has to happen before rendering. Benchmark results vary by workload, and there is little direct evidence on coding-agent accuracy.
- **Holds up over time: 5.7** (likely 4.5 to 7.0)
  - Claude Opus 5.5 (4.5): There were 32 commits and two releases last year, and both releases were security patches. The 4.7.x line had no feature work, and no v5 roadmap is visible. Advisories do get fixed and the repository is not archived. Still, the Scorecard 'Maintained' check is 4, and 50 pull requests are open. Its enormous installed base makes abandonment unlikely, but it is in maintenance mode.
  - GPT-6.2 Sol (6.8): The stable line received two security-focused releases in 2026 after a gap of more than two years, and the development branch identifies itself as a 5.0 alpha. The same maintainer published both recent GitHub releases, and EJS and LiquidJS had more commits over the past year. The timing of 5.0 and the number of people who can publish to npm remain unclear.
- **Used widely: 7.4** (likely 6.3 to 8.5)
  - Claude Opus 5.5 (7.0): About 226M downloads per 4 weeks and 1.26M dependent repositories make it one of the two most-installed engines, next to EJS. Much of that comes from transitive installs by tools such as coverage reporters and generators. Its year-over-year ratio of 2.3 is well below the 4.1 median and the lowest among its peers, so it is losing share of new choices.
  - GPT-6.2 Sol (7.8): About 1.26 million tracked repositories depend on Handlebars, second to EJS among the listed peers. Four-week downloads grew 2.29 times year over year, below the 4.1 times catalog baseline and every listed peer, suggesting a loss of relative share. Tooling such as Plop also installs Handlebars, so the counts leave uncertainty about how many teams choose it for server rendering.
- **Vouched for: 7.1** (likely 6.0 to 8.1)
  - Claude Opus 5.5 (6.0): Widely used tools depend on it, including istanbul coverage reports, Plop and Ghost themes. Its syntax is the basis for template features in several email and document services, and independent comparisons still name it the standard for email templates. There are no recent survey satisfaction data, and the endorsements are mostly long-standing rather than new.
  - GPT-6.2 Sol (8.1): Ghost uses Handlebars for its production theme layer, and Twilio SendGrid supports the language for dynamic email. NestJS Mailer and jsreport independently integrate the library for email and reports. These uses establish a strong track record, with less direct evidence on developer satisfaction or retention.
- **Safe: 5.7** (likely 4.6 to 6.8)
  - Claude Opus 5.5 (5.0): There were 11 advisories in 24 months, including critical CVSS 9.8 JavaScript-injection bugs in compile(). The October 2026 fix in 4.7.10 had to close a bypass of the March 4.7.9 fix. Fixes did ship, and apps that only pass trusted template strings are mostly unaffected. The OpenSSF Scorecard is 5.2, with zeros for token permissions, pinned dependencies, fuzzing and SAST. The licence is MIT and there are 5 dependencies.
  - GPT-6.2 Sol (6.3): Version 4.7.10 fixed both October critical advisories by public disclosure, including a bypass of the March fix. The package has an MIT license and five listed dependencies, including one optional dependency, and the project documents manual npm publishing. The 5.2 OpenSSF score, weak workflow token permissions, and unpinned workflow dependencies leave supply-chain concerns. Compiling templates supplied by users remains a poor fit.

## Good

- Logic-less syntax with helpers and partials keeps business logic out of templates, which suits emails and templates edited by non-developers.
- Precompilation and a runtime-only build let templates be compiled at build time and shipped without the compiler.
- The syntax is very well known and shared by many services and tools, so docs, examples and AI-generated code are plentiful.
- Ships its own TypeScript types and runs in both Node and the browser.

## Bad

- Development has stalled on the 4.7.x line, with no 5.0 in sight. Releases since 2023 have been security patches only.
- In 2026 there were several critical JavaScript-injection advisories in compile(). The 4.7.10 fix had to close a bypass of the 4.7.9 fix.
- Slower than Eta and EJS in independent benchmarks unless templates are precompiled.
- Its download growth is the weakest in its category, so its share of new projects is shrinking.

## The numbers

- Downloads, 4 weeks: 226M
- In a year: ×2.3
- GitHub stars: 19k
- Commits, 12 months: 32
- Last npm release: Oct 2026
- Advisories, 24 months: 11
- Licence: MIT
- GitHub: https://github.com/handlebars-lang/handlebars.js
- npm: https://www.npmjs.com/package/handlebars

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.
