
EJS
Templating language that generates HTML from plain JavaScript written inside templates, for Node.js and the browser.
EJS is a templating language that writes HTML with plain JavaScript. Templates hold JavaScript between scriptlet tags, and output tags insert values escaped or unescaped. The library compiles a template to a JavaScript function, which it caches, and runs on Node.js or in the browser. In the browser, a prebuilt script compiles and renders template strings, while loading template files needs the Node.js entry point. EJS installs from npm, ships a command-line tool, and complies with the Express view system, so an Express app can use it as its view engine.
Worth knowing
The README states that EJS is effectively a JavaScript runtime, so giving end users unrestricted access to the render method is an unsafe way to use it. Escaping covers HTML content and quoted attributes by default, and the README says other output contexts need their own escape function.
Identity
- Status
- Active
- Maintainer
- Matthew Eernisse1
- Maintained by
- Individual
- First release
- 20114
Rendering and deploy
Releases
Adoption
Sources
- 2026-11-08: links, Maintainer, Categories, License, Install with
ejs.co/ - 2026-11-08: links, Written in, GitHub stars
api.github.com/repos/mde/ejs - 2026-11-08: links, Runtime, Install with
ejs.co/docs/ - 2026-11-08: First release
registry.npmjs.org/ejs - 2026-11-08: Minimum runtime
github.com/mde/ejs/blob/main/README.md - 2026-11-08: Current major version
api.github.com/repos/mde/ejs/releases?per_page=40 - 2026-11-08: Last release
api.github.com/repos/mde/ejs/releases/latest - 2026-11-08: Contributors
api.github.com/repos/mde/ejs/contributors?per_page=1 - 2026-11-08: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/ejs - 2026-11-08: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/ejs