sort_natural

Sort elements of an array in ascending alphabetical order without case sensitivity.

Syntax

{{ array | sort_natural: property }}

Example

{% assign list = "beta,Alpha,Gamma" | split: "," %}{{ list | sort_natural | join: ", " }}

Output

Alpha, beta, Gamma

The sort_natural filter organizes array elements into case-insensitive alphabetical order, preventing uppercase letters from sorting ahead of lowercase letters solely due to ASCII values.

On programmatic landing pages, sort_natural handles mixed-case product brand names or software integration tags gracefully. For example: {{ row.supported_tools | split: ';' | sort_natural | join: ' • ' }}. This ensures 'alpha' and 'Beta' sit together naturally, creating polished lists that look curated rather than machine-generated.

Try this syntax in the editor.