{{.}}

Mutor.js

Fast, synchronous templating

Sync-only runtime ยท Safe by default

A template engine built for predictable production rendering

Mutor.js gives you fast synchronous rendering, first-class layouts, includes, file rendering, and sensible security defaults without turning templates into unrestricted JavaScript.

Default safety

Escaped output, blocked dangerous properties, and function calls disabled by default.

Composable

Use includes, registered components, layouts, server rendering, and directory builds.

Practical syntax

Conditionals, loops, namespaces, whitespace control, and context-aware rendering.

dashboard.html
Mutor
{{# use "shell" }}
<section class="dashboard">
  <h1>{{ user.name }}</h1>
  {{ if user.admin }}
    <span class="badge">Admin</span>
  {{ endif }}

  <ul>
    {{ for project of projects }}
      <li>{{ project.title }}</li>
    {{ endfor }}
  </ul>
</section>

0

Runtime deps

v3

Layouts included

Sync

Predictable rendering

Install

npm i mutorjs
yarn add mutorjs
pnpm add mutorjs

Why Mutor.js

Small surface area, useful composition features, and safer defaults.

Mutor is a practical choice for documentation sites, static output, server-rendered HTML, and teams that want template power without giving templates unrestricted access to the JavaScript runtime.

Read the guide

Learn the template language quickly

Start with the introduction, installation, getting started, syntax, includes, layouts, and the security model.

Security posture

Constrained templates by design

Mutor escapes interpolated output by default, blocks dangerous property access, and disables context function calls unless you opt in.

Reference

API, CLI, config, and migration notes

Jump straight into the API reference, CLI usage, configuration options, caching, and the v2 to v3 migration guide.

Ready to try it?

Render your first template in a few lines.

Use the getting started guide to render strings, files, includes, and layouts, then move into the docs reference when you need more.