Do you know what is JSFiddle or Codepen ? Well, now you can use TwigFiddle too !

How to execute TWIG code online

As we know, there are many services to execute code quickly online without open our favorite IDE.

JSFiddle and Codepen provides an online environment to save and execute HTML, CSS and Javascript immediately.

These languages can be also fast executed in our computer with not so much effort creating a html file, writing on it and opening in your favorite browser, however there are languages that are not so easy as that (unless you have a dedicated environment) for example PHP, Python, Java, C++, C-Objective etc .

In this article , i would like to share an useful tool to execute your snippets of Twig , the templating engine of Sensiolabs, this tool is called Twig Fiddle, here you'll be able to execute and share your twig code. This can be executed with different versions of twig.

Twig ( is a modern template engine for PHP, based on Django and Jinja syntaxes. It is an opensource product, released under the new BSD license ( by Fabien Potencier.

As Twig becomes well known, a lot of questions are asked on Q/A websites, such as, and some answers can be more explicit with runnable examples.

A lot of websites exists to run code online: for Javascript, for database queries, for C, C++, PHP, (and lots of others)...'s aim is to provide a small development environment to develop, run, store and access Twig code online.

Start executing your twig online in this example :

Or visit the official website of Twig Fiddle here.

Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.