---
title: "Liquid Markup Filters"
slug: "liquid-markup-filters"
updated: 2026-04-16T19:30:39Z
published: 2026-04-16T19:30:39Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.technolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Liquid Markup Filters

In [Liquid markup](/v1/docs/getting-started-with-liquid-markup), **filters** let you transform data before it’s displayed.

This can be useful for modifying the returned value of merge fields or exports, without making adjustments to the underlying query.

Liquid provides a number of standard filter keywords, which we describe in this article.

> [!NOTE]
> ✨ Prompting Slate AI
> 
> Ask [Slate AI](/v1/docs/slate-ai) for help working with Liquid markup filters:
> 
> - 💬 *Help me format a list of dates from a Liquid loop so each one appears as 'Day of week, Month Day' using date filters.*
> - *💬 How do I sort a list of awards by amount using the sort filter and display them from highest to lowest?*
> - 💬 *Help me remove extra whitespace in a text field using the strip filter in my portal content.*

## How Liquid markup filters work

Add filters to text or a merge field you want to modify:

- In a Liquid markup object `{{ }}`, enter some text in quotes, or the name of a merge field: `{{"Hello world"}}`
- Add a pipe delimiter after that content: `{{"Hello World" | }}`
- Add the filter keyword after the pipe delimiter: `{{"Hello World" | upcase }}`

The filter takes that text or export and transforms it accordingly: `HELLO WORLD`

## Examples

Following the previous example, say you have an export, such as `{{academic-intererests}}`, that you want to be all lowercase.

You can use `downcase`:

```plaintext
{{academic-interests | downcase}}
```

Which renders the value of `academic-interests` (say, *Biology*) as:

```plaintext
biology
```

## Standard Liquid filters

The following are standard filters that can operate on Slate exports and plain text:

| **Filter** | **Function** | **Example** |
| --- | --- | --- |
| `block` | Allow you to pass in a value and output a [content block](/v1/docs/creating-content-blocks-formerly-mailing-snippets). Interchangeable with ‘snippet’. | `{{ program \| block: "program_long_description" }}` |
| `date` | Formats a date | `{{form-date \| date: 'MMMM d, yyyy' }}` |
| `divided_by` | Divides two numbers | `{{registration_limit \| divided_by: registrants }}` |
| `downcase` | Sets all letters to lowercase | `{{first \| downcase }}` |
| `first` | Returns the first element of an array | `{{academic_interests \| first }}` |
| `last` | Returns the last element of an array | `{{academic_interests \| last }}` |
| `map` | Returns only the specified elements in an array | `{{scholarships \| map: 'names'}}` |
| `minus` | Subtracts two numbers | `{{registration_limit \| minus: registrants }}` |
| `modulo` | Returns the remainder after division | `{{4 \| modulo: 2 }}` |
| `plus` | Adds two numbers | `{{registrants \| plus: waitlist }}` |
| `replace_first` | Replaces the first occurrence of a match | `{{sisID \| replace_first:'Slate-', '' }}` |
| `size` | Returns the number of elements in an array or the number of characters in a string | `{{academic_interests \| size}}` `{{academic_interests.size}}` |
| `snippet` | Allow you to pass in a value and output a [content block](/v1/docs/creating-content-blocks-formerly-mailing-snippets). Interchangeable with ‘block’. | `{{ program \| snippet: "program_long_description" }}` |
| `split` | Splits a string into an array on a matching criteria | `{{ academic_interests \| split: "\|" }}` |
| `strip_html` | Removes HTML tags from a string | `{{ academic_interests \| strip_html }}` |
| `times` | Multiples two numbers | `{{courses \| times: 550 }}` |
| `uniq` | Dedupes values in an array | `{{ academic_interests_array \| uniq }}` |
| `upcase` | Sets all letters to uppercase | `{{ first \| upcase }}` |
| `where` | Limits results based on specific criterion. To include an item, both comma-separated variables should return the same value. | `{% for item in list \| where: “list.state”,”OR” %}` |

## Chaining filters

You can **chain filters**together to perform several actions in a row on the same export.

Filters work from left to right: each subsequent filter processes the output rendered by the previous one.

In this example, we take the value of the `academic-interest` export and render it in all lowercase with `downcase`. Then, the lowercase academic interest is shortened by `truncate` to the specified `10` characters:

```plaintext
{{academic-interests | downcase | truncate: 10}}
```

So, a program like `Environmental Sciences`**would display as `environmen`*.*

**📖**See the [Shopify documentation on Liquid markup filters](https://shopify.dev/docs/api/liquid/filters).
