mde/ejs

Embedded JavaScript templates -- http://ejs.co

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 5 minutes ago
Added to GitGenius on September 8th, 2026
Created on December 31st, 2014
Open Issues & Pull Requests: 27 (+0)
GitHub issues: Enabled
Number of forks: 844
Total Stargazers: 8,123 (+0)
Total Subscribers: 118 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 47.2 hours
Mean response time: 340.1 days
90th percentile: 1588.0 days
Tracked items: 129

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 5% of issues opened in the past year have been closed. Three people close 96% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 4
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 395 days
Stale 30+ days: 4
Stale 90+ days: 3

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (8)
  • documentation (2)
  • help wanted (2)
  • bug (1)
  • discussion (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

EJS is a templating engine that embeds JavaScript for generating dynamic content on servers and in browsers.

EJS solves the problem of rendering dynamic HTML by allowing developers to write templates that mix markup with JavaScript logic. The approach is straightforward: templates use simple tag syntax to denote control flow, output, and includes. The `<% %>` tags handle logic, `<%= %>` outputs escaped values, `<%- %>` outputs raw unescaped content, and `<%_ _%>` trims whitespace. Templates are compiled to intermediate JavaScript and cached for performance, then executed with provided data to produce final output.

EJS suits projects that need lightweight server-side or client-side templating without a heavy framework. It works well in Express applications, where it integrates directly with the view system, and in any Node environment where simple template compilation is sufficient. The tool supports both CommonJS and ES Modules, runs in modern browsers and older ones alike, and works cleanly with bundlers including Webpack, Vite, esbuild, Rollup, and Bun. Developers should be aware that EJS is fundamentally a JavaScript runtime, and the security documentation explicitly states that rendering untrusted input without validation is the developer's responsibility, not a flaw in the tool.

The project maintains active attention to module compatibility across different JavaScript environments. Recent work removed a dual-mode shim that caused issues with modern ESM-aware bundlers, moving the compatibility layer into the CommonJS compilation step instead. The tool continues to support a wide range of Node versions and browser environments while keeping the published package clean for contemporary bundler ecosystems.