size

Return the length of a string or the number of items in an array collection.

Syntax

{{ array_or_string | size }}

Example

{% assign plans = "Free,Pro,Enterprise" | split: "," %}{{ plans | size }} Tiers Available

Output

3 Tiers Available

The size filter counts and returns the number of characters in a string or the total count of elements within an array, providing an integer measurement of collection scale.

In programmatic SEO architectures, size triggers conditional logic based on feature availability or displays dynamic summary counts in category headers. For example: {% assign count = row.perks | split: ';' | size %}{{ count }} exclusive benefits included with your local service appointment. This highlights product density and service richness effectively.

Try this syntax in the editor.