Twig (template engine)

Twig
Original author(s)Armin Ronacher, Fabien Potencier
Developer(s)Symfony SAS
Initial releaseOctober 12, 2009 (2009-10-12)
Stable release
3.21.1 / 3 May 2025 (3 May 2025)
Repository
Written inPHP
Operating systemCross-platform
TypeTemplate engine
LicenseBSD License
Websitetwig.symfony.com

Twig is a template engine for the PHP programming language. Its syntax originates from Jinja and Django templates. It's an open source product licensed under a BSD License and maintained by Fabien Potencier. The initial version was created by Armin Ronacher. Symfony PHP framework comes with a bundled support for Twig as its default template engine since version 2.

The same template language is used by the Nunjucks template engine, thus Nunjucks is also supported by the following tools.