Skip to content

Liquid filters

Filters transform values: {{ product.price | money }}. Click any filter for syntax, parameters, and example output.

Money

FilterDescription
moneyFormats a price (stored in paise) using the store currency.
money_with_currencyFormats a price and appends the ISO currency code.
money_without_currencyFormats the amount without a currency symbol.
money_without_trailing_zerosFormats a price, dropping “.00” when whole.
money_amountReturns the decimal amount as a number, for arithmetic.

Images & media

FilterDescription
image_urlReturns a CDN URL for an image, resized and optimized on the fly. Requires width or height.
image_tagRenders a complete element (srcset, sizes, alt, lazy-loading) from an image URL.
media_tagRenders any media object: image, adaptive-streaming video player, or interactive 3D/AR viewer.
video_tagRenders a
preload_tagEmits for a resource URL — use on the LCP hero image.
payment_type_img_urlURL of the icon for a payment type.
payment_type_svg_tagInline SVG tag for a payment type icon.

Colors

FilterDescription
color_to_rgbConverts a color to rgb()/rgba() notation.
color_to_hslConverts a color to hsl()/hsla() notation.
color_to_hexConverts a color to 6-digit hex.
color_to_oklchConverts a color to oklch() notation (modern CSS color space).
color_lightenLightens a color by a percentage.
color_darkenDarkens a color by a percentage.
color_saturateIncreases saturation by a percentage.
color_desaturateDecreases saturation by a percentage.
color_mixMixes two colors by weight.
color_modifySets one channel of a color (red, green, blue, alpha, hue, saturation, lightness).
color_extractReads one channel of a color.
color_brightnessPerceived brightness (0–255) — use to choose readable text color.
color_contrastWCAG contrast ratio between two colors.
color_differenceColor difference between two colors (0–765).
brightness_differenceBrightness difference between two colors (0–255).

Fonts

FilterDescription
font_faceEmits the @font-face CSS for a font setting.
font_familyThe CSS font-family stack for a font, including fallbacks.
font_urlCDN URL of the font file (woff2 by default).
font_stylesheet_urlURL of a stylesheet covering the given fonts.
font_stylesheet_tagComplete tag for the given fonts.
FilterDescription
asset_urlVersioned CDN URL for a file in the theme’s assets/ folder.
global_asset_urlURL for a platform-provided shared asset.
shopify_asset_urlCompatibility alias for platform asset URLs (eases Shopify theme ports).
file_urlPublic URL for a file uploaded in the admin (Files).
stylesheet_tagRenders a for a URL.
script_tagRenders a
inline_asset_contentInlines a theme asset’s raw contents into the page (ideal for SVG icons).
link_toBuilds an tag.
link_to_tagLink that filters the current collection to one tag.
link_to_add_tagLink that adds a tag to the active collection filters.
link_to_typeLink to the automatic collection for a product type.
link_to_vendorLink to the automatic collection for a vendor.
url_for_typeURL of the automatic collection for a product type.
url_for_vendorURL of the automatic collection for a vendor.
highlight_active_tagWraps the tag in a highlight class when it is an active filter.
customer_login_linkLogin link for the customer account area.
customer_logout_linkLogout link for the signed-in customer.
customer_register_linkRegistration link for new customer accounts.
login_buttonRenders the platform login button.
url_escapePercent-encodes unsafe URL characters.
url_param_escapePercent-encodes a value for use as a query parameter (also encodes &).
encode_url_componentJavaScript-style encodeURIComponent.

Strings & data

FilterDescription
tTranslates a key from the theme’s locales/ files. Supports interpolation and counts.
translateAlias of t.
jsonSerializes any value or object to JSON.
api_jsonSerializes drops into the storefront-API JSON shape — for passing data to JavaScript.
structured_dataJSON-LD structured data (Product, Article…) for rich search results.
format_addressLocale-aware HTML for a postal address.
dateFormats a date with strftime patterns or named formats; locale-aware.
time_tagSemantic
pluralizeChooses singular or plural based on a count.
camelizeConverts a string to CamelCase.
highlightWraps occurrences of the search terms in .
base64_url_safe_encodeURL-safe Base64 encode.
base64_url_safe_decodeURL-safe Base64 decode.
blake3BLAKE3 hash of a string (hex).
defaultFallback when a value is nil, false, or empty.
default_paginationRenders prev/next page controls for a paginate block.
sort_byAppends a sort_by parameter to a collection URL.
withinScopes a product URL to a collection for collection-aware navigation.

Commerce

FilterDescription
product_inventory_jsonPer-variant live inventory payload used by themes for client-side availability.
payment_buttonRenders the dynamic checkout button for the current product form.
payment_termsRenders payment terms/installments messaging when available.
avatarAvatar element (initials) for a customer.
editor_settingTheme-editor binding attribute so a setting becomes click-to-edit in the visual editor. No output on the live store.

Standard

FilterDescription
absAbsolute value.
appendAppends a string.
at_leastClamps a number to a minimum.
at_mostClamps a number to a maximum.
capitalizeUppercases the first character.
ceilRounds up.
compactRemoves nil values from an array.
concatConcatenates two arrays.
divided_byDivision.
downcaseLowercases a string.
escapeHTML-escapes a string.
escape_onceHTML-escapes without double-escaping entities.
firstFirst element of an array.
floorRounds down.
joinJoins array elements with a separator.
lastLast element of an array.
lstripStrips leading whitespace.
mapPlucks a property from each element.
minusSubtraction.
moduloRemainder.
newline_to_brConverts newlines to
.
plusAddition.
prependPrepends a string.
removeRemoves every occurrence of a substring.
remove_firstRemoves the first occurrence of a substring.
replaceReplaces every occurrence.
replace_firstReplaces the first occurrence.
reverseReverses an array.
roundRounds to the nearest integer or given decimals.
rstripStrips trailing whitespace.
sizeLength of a string or array.
sliceSubstring/sub-array by offset and length.
sortSorts an array (case-sensitive); pass a property to sort objects.
sort_naturalCase-insensitive sort.
splitSplits a string into an array.
stripStrips surrounding whitespace.
strip_htmlRemoves HTML tags.
strip_newlinesRemoves newline characters.
sumSums array values; pass a property name for objects.
timesMultiplication.
truncateTruncates to a length with an ellipsis.
truncatewordsTruncates to a word count.
uniqRemoves duplicates.
upcaseUppercases a string.
url_decodeDecodes percent-encoding.
url_encodePercent-encodes for URLs (spaces become +).
whereFilters an array of objects by property value.