Skip to content

Developers · Liquid

Liquid Filters Introduction

Last updated 1 November 2026

What Liquid filters are, how to chain them, and where the standard and Insites filters are listed.

A filter changes a value before Liquid prints it or assigns it. You write it after the value with a pipe character, |. Use filters to format dates and money, change text, do arithmetic, and work with arrays and hashes.

How filters work

Filters run from left to right. Each one takes the result of the one before it. Some take arguments, written after a colon and separated by commas.

insites-cli exec liquid docs57 "{{ 'Health potion' | upcase | remove: 'HEALTH' }}|{{ 3 | plus: 4 | times: 2 }}"
 POTION|14

This ran on the docs.insites.io instance on 1 November 2026. The text became HEALTH POTION, then lost the word HEALTH. The numbers became 7, then 14.

Filters in an assign

{%- assign title = product.title | strip | capitalize -%}
{%- assign total = price | times: quantity -%}

Two sets of filters

SetWhat it covers
Standard filtersThe filters every Liquid has: text, numbers, arrays, dates
Insites filtersFilters only Insites has, such as l for dates, t for translations, time_diff, parse_json and asset_url

Some filters have a second, older name. The Insites names t, t_escape and l are the main spellings; translate, translate_escape and localize still work but an editor may mark them as deprecated.

Common mistakes

  • Putting a filter inside a tag that takes one value, such as redirect_to. The filter is dropped with no error. Assign first, then use the variable.
  • Expecting time_diff to return hours. It returns milliseconds unless you pass a unit such as 'h'.
  • Chaining filters in the wrong order. They run left to right, so remove before upcase gives a different result.