> For the complete documentation index, see [llms.txt](https://docs.pixiebrix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pixiebrix.com/developing-mods/developer-concepts/text-template-guide/transforming-data-with-filters.md).

# Transforming Data with Filters

You can transform an expression by providing one or more filters in the template expression. Filters are provided using the `|` pipe operator.

For example, to upper case the pet’s name:

```
I have one {{ @pet.type }} named {{ @pet.name | upper }}
```

Will produce the following:

```html
I have one cat named TIGER
```

{% hint style="info" %}
A complete [list of supported filters is available here](https://mozilla.github.io/nunjucks/templating.html#builtin-filters).
{% endhint %}

Some filters accept arguments. To pass arguments to a filter, include the arguments list in parentheses: `filter(arg1, arg2, ...)`

Popular transformation filters are:

* `title`: convert text to Title Case
* `truncate`: truncate the text with ellipses. For example: `@description | truncate(10)` to truncate text to 10 characters.
* `join`: concatenate values using a separator. For example: `@names | join(",")`

{% hint style="info" %}
Under the hood, PixieBrix uses the popular [Nunjucks templating language](https://mozilla.github.io/nunjucks/), developed by the non-profit that makes the Firefox web browser!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pixiebrix.com/developing-mods/developer-concepts/text-template-guide/transforming-data-with-filters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
