Filters are a feature of the Nunjucks templating language that allow you to modify variables. Separated by a pipe symbol (|), they can be chained together, with the output of one filter passed on to the next.

For example, {{ "<p>GOV.UK</p>" | striptags | lower }} will remove the HTML tags, lower-case the remaining string and output

GOV.UK Prototype Filters provides an additional collection of filters which can be used to transform:


The project repository is public and we welcome contributions from anyone.

View this project on GitHub