--- url: https://developer.youcan.shop/themes/filters/strings/split.md --- # Split Splits a string into an array of substrings at each instance of a separator. An empty separator splits the string into single characters. ```liquid {{ string | split: separator }} ``` ## Example ```liquid {% assign colors = 'red,green,blue' | split: ',' %} {% for color in colors %} {{- color }} {% endfor %} ``` ::: tip Output ```html red green blue ``` :::