Handlebars
Reasonable, with limits. 4th of 8 template engines.
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
Overall6.5
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 5.5, likely 4.5 to 6.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.
- npm download ratio vs medianDownloadsRatio: 2.3 against a median of 4.1, so it is losing ground
- advisories recent: Critical injection advisories in March and October 2026
- pkgpulse.com/guides/handlebars-vs-ejs-vs-eta-server-side-template-engines-2026: Positioned as the pick for email, with Eta for performance and TypeScript
- peers LiquidJS commitsLastYear: LiquidJS had 111 commits, against 32 for Handlebars
GPT-6.2 Sol: 7.5, likely 6.3 to 8.6
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.
- docs.ghost.org/themes: Shows a maintained production use for server-rendered views.
- ejs.co: Documents JavaScript expressions and control flow in templates.
- liquidjs.com/tutorials/sync-and-async.html: Documents native asynchronous rendering.
- github.com/handlebars-lang/handlebars.js/releases: Shows a long stable release gap followed by two security updates.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Relative download growth trails the catalog baseline.
Needed by many5.1
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.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.
- pkgpulse.com/guides/handlebars-vs-ejs-vs-eta-server-side-template-engines-2026: Recommends component frameworks for interactive apps and Handlebars for email templates
- dependents.packages: 15.5k npm packages depend on it, many of them tooling and codegen
GPT-6.2 Sol: 5.2, likely 4.1 to 6.4
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.
- survey.stackoverflow.co/2026/technology/data: Shows use of Node.js, Express, and frameworks with their own rendering systems.
- handlebarsjs.com/guide: Documents framework-independent HTML and text rendering.
- twilio.com/docs/sendgrid/for-developers/sending-email/using-handlebars: Shows transactional and marketing email use.
Helps a lot7.0
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.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.
- pkgpulse.com/guides/handlebars-vs-ejs-vs-eta-server-side-template-engines-2026: Rated moderate on performance with the largest bundle, but the standard choice for email
- github.com/crafter999/template-engine-benchmarks: Independent benchmark puts Handlebars slowest of Eta, EJS, Nunjucks and Handlebars
- npm hasTypes: Ships its own TypeScript types
GPT-6.2 Sol: 7.9, likely 6.8 to 9.0
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.
- handlebarsjs.com/guide: Runnable examples for context, helpers, and blocks.
- handlebarsjs.com/api-reference/compilation.html: Documents precompilation and strict handling of missing fields.
- github.com/handlebars-lang/handlebars.js/blob/v4.7.10/types/index.d.ts: Shipped declarations describe synchronous rendering and the host API.
- reddit.com/r/node/comments/1cvsgs8/where_to_go_for_templating_after_pugjs: Developers value the separation of logic and markup and report friction with simple expressions.
- github.com/itsarnaud/template-engine-bench: Handlebars beats EJS on several fixtures and trails it on another.
Holds up over time5.7
Will it still be a good choice in two years?
Claude Opus 5.5: 4.5, likely 3.5 to 6.0
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.
- github commitsLastYear / releasesLastYear: 32 commits and 2 releases in the last year
- scorecard Maintained: Maintained check scores 4/10
- github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md: Release notes on master still end at v4.7.7 (2021), showing little feature activity
- github openPullRequests: 50 open pull requests
GPT-6.2 Sol: 6.8, likely 5.5 to 8.0
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.
- github commitsLastYear, releasesLastYear, openPullRequests: 32 commits, two releases, and 50 open pull requests.
- peers commitsLastYear: EJS had 55 commits and LiquidJS had 111.
- github.com/handlebars-lang/handlebars.js/releases: Release history shows the long patch gap and the same publisher for both 2026 releases.
- github.com/handlebars-lang/handlebars.js/blob/master/package.json: The development branch identifies itself as 5.0.0-alpha.1.
Used widely7.4
How many use it, and is that growing?
Claude Opus 5.5: 7.0, likely 6.0 to 8.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.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 226.4M vs 98.7M, a ratio of 2.3 against a median of 4.1
- dependents.repos: 1.26M dependent repos, second only to EJS (1.53M)
- peers Eta downloads: Eta grew about 8x, while Handlebars grew 2.3x
- bluesky posts: Zero Bluesky posts, so little current attention
GPT-6.2 Sol: 7.8, likely 6.5 to 9.0
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.
- dependents repos, packages: 1,258,975 tracked repositories and 15,556 packages.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: 226.4 million versus 98.7 million downloads, or 2.29 times against a 4.1 times baseline.
- peers dependentRepos, downloadsLast4Weeks, downloadsSame4WeeksYearAgo: EJS leads tracked dependents and every listed peer grew faster.
- github.com/plopjs/plop: Uses Handlebars in code generation, outside the server-rendering category.
Vouched for7.1
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 5.0 to 7.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.
- pkgpulse.com/guides/handlebars-vs-ejs-vs-eta-server-side-template-engines-2026: Independent 2026 guide recommends it for email templates
- npm-compare.com/ejs,eta,handlebars,mustache,nunjucks,pug: Third-party comparison of usage among peers
- istanbul-reports, Plop, Ghost: Well-known tools that build on Handlebars
- hackerNews stories: Recent HN posts are third-party products built on Handlebars helpers
GPT-6.2 Sol: 8.1, likely 6.9 to 9.2
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.
- docs.ghost.org/themes: Ghost uses Handlebars to render publication themes.
- twilio.com/docs/sendgrid/for-developers/sending-email/using-handlebars: SendGrid supports Handlebars syntax in production email templates.
- nest-modules.github.io/mailer/v3/adapters: NestJS Mailer ships a Handlebars adapter.
- jsreport.net/learn/handlebars: jsreport integrates the package for report rendering.
Safe5.7
How safe is it to depend on?
Claude Opus 5.5: 5.0, likely 4.0 to 6.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.
- advisories last24Months: 11 advisories in the last 24 months, several critical
- github.com/advisories/GHSA-8r5x-fm3f-whwj: Critical bypass of the 4.7.9 fix, patched in 4.7.10; string-only callers are not affected
- nvd.nist.gov/vuln/detail/CVE-2026-33937: CVSS 9.8 RCE through a crafted AST passed to compile(), fixed in 4.7.9
- scorecard score: 5.2 overall, with several checks at 0
GPT-6.2 Sol: 6.3, likely 5.1 to 7.5
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.
- github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.10: October patch links both critical fixes and the inline precompilation fix.
- github.com/advisories/GHSA-8r5x-fm3f-whwj: Confirms 4.7.10 patches a bypass of the earlier fix.
- github.com/handlebars-lang/handlebars.js/blob/v4.7.10/package.json: MIT license and a small dependency list with an optional minifier.
- github.com/handlebars-lang/handlebars.js/blob/v4.7.10/CONTRIBUTING.md: Documents a manual npm publish step.
- scorecard score, checks: 5.2 overall, with zero scores for token permissions and pinned dependencies.
- handlebarsjs.com/api-reference/runtime-options.html: Documents prototype access defaults and limits when rendering untrusted templates.
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
- npm downloads, 4 weeks
- 226M ×2.3 in a year
- GitHub stars
- 19k
- Commits, 12 months
- 32
- npm version
- 4.7.10 Oct 2026
- Versions, 12 months
- 2
- Advisories, 24 months
- 11 of 22 ever
- OpenSSF Scorecard
- 5.2 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (handlebars-lang/handlebars.js), npm (handlebars), OSV and the OpenSSF Scorecard.