🚀14 JS Template Engines🚀
Tags: javascript, node, express, backend
Published: 2021-01-12 06:19:16

---
title: 🚀14 JS Template Engines🚀
published: true
date: 2021-01-12 06:04:29 UTC
tags: JavaScript,Nodejs,Express,backend
canonical_url: https://h.shadowtime2000.com/14-js-template-engines
---

## 🚀14 JS Template Engines🚀

This is a list of 14 JS template engines.

### [EJS](https://ejs.co)

![EJS Logo](https://ejs.co/favicon.svg)

EJS is a pretty popular template engine, it stands for Embeddable JavaScript because it runs with just JavaScript inside it's tags.

### [Mustache](https://mustache.github.io/)

Mustache is actually a template engine specification with implementations of that spec in multiple different programming languages. It does have an implementation in JS. It uses "logic-less" templates where there are predefined ways to do stuff with data such as looping and displaying.

### [Handlebars](https://handlebarsjs.com/)

![Handlebars Logo](https://cdn.tutsplus.com/net/uploads/2013/07/handlebars-behind-scenes-retina-preview.jpg)

Handlebars is an extension of the Mustache template engine with some modifications to partials and [a couple more features](https://www.npmjs.com/package/handlebars#differences-between-handlebarsjs-and-mustache). 

### [Pug/Jade](https://pugjs.org/api/getting-started.html)

![Pug Logo](https://cdn.dribbble.com/users/1057/screenshots/5978248/pug_1x.jpg)

Pug is one of the template engines which is meant only for HTML rendering. It uses indented whitespace sensitive syntax to write tags and such. It's typically called Pug/Jade because [it's previous name was Jade before it was changed to Pug because of copyright issues](https://github.com/pugjs/pug#rename-from-jade). The templating part allows you to write JS inside of it to use data to render stuff.

### [Lodash](https://docs-lodash.com/v4/template/)

![Lodash Logo](https://logo.kenh.net/logo/lodash.svg.jpg)

You may be thinking, *Lodash is a JS utility library so why is it listed as a template engine?* Well, Lodash has [a utility known as `lodash.template`](https://docs-lodash.com/v4/template/) which is pretty much like EJS.

### [doT](https://olado.github.io/doT/)

![doT Logo](https://olado.github.io/doT/doT-js-100@2x.png)

doT is a template engine which uses a mixture of embeddable JS and some predefined syntax within tags.

### [Nunjucks](http://mozilla.github.io/nunjucks/)

![Nunjucks Logo](https://css-tricks.com/wp-content/uploads/2017/05/nunjucks.png)

You have probably heard of this template engine if you have used 11ty because it seems to be mainly used there. Nunjucks was created by Mozilla and is inspired by Jinja2, a Python template engine. It uses predefined syntax within tags.

### [Liquid](https://liquidjs.com/)

![Liquid Logo](https://i.ytimg.com/vi/848QV4H0IDE/maxresdefault.jpg)

Liquid is another cross language template engine with the original implementation being written in Ruby and various JS ports existing. It uses syntax kind of like Nunjucks.

### [Squirrelly](https://squirrelly.js.org/)

![Squirrelly Logo](https://avatars2.githubusercontent.com/u/48598909?s=200&v=4)

Squirrelly is a semi-embeddable template engine which emphasizes on low bundle size (4KB), pluggability, configurability, and fast performance.

### [Eta](https://eta.js.org)

![Eta Logo](https://avatars2.githubusercontent.com/u/62761422?s=400&u=9787a482342d01fe7e433f9cfe2e1470b5b0c0e3&v=4)

Eta is an embeddable template engine with almost completely compatible syntax of EJS and emphasizes on low bundle size (<3KB minzipped), pluggability, configurability, and fast performance. Interestingly Eta is created by the same person who made Squirrely, and intended Eta to be a lot smaller. Eta has a very similar codebase when compared with Squirrelly. 

(Diclaimer: I am a maintainer of Eta)

### [Hogan](https://twitter.github.io/hogan.js/)

Hogan is a JS implementation of the Mustache spec by Twitter. It has the same syntax and stuff, but the implementation with rendering and compilation is different.

### Swig

Swig is another JS template engine with syntax like Nunjucks.

### [ECT](http://ectjs.com/)

ECT is an embeddable template engine which uses CoffeeScript instead of JavaScript for embedded code.

### [Dust](http://www.dustjs.com/)

DustJS is another "logic-less" template engine but has support for advanced features such as async streaming. 

You might also like:

[How to Create a Template Engine in JS](https://hackernoon.com/how-to-create-new-template-engine-using-javascript-8f26313p)