{"title":"default - Liquid Filter Reference","slug":"default-filter-reference","url":"https://support.storeconnect.com/articles/default-filter-reference","url_markdown":"https://support.storeconnect.com/articles/default-filter-reference.md","subtitle":null,"summary":"Provides a fallback value when a variable is nil, false, or blank. Use the `allow_false` option to let false pass through instead of triggering the default.","type":"Developer_Documentation","video_url":"","keywords":"liquid, filters, default, utilities, storeconnect","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"## Description\n\nSets a default value for any variable which is `nil`, `false`, or `blank`.\n\n| Property | Value |\n|----------|-------|\n| **Return Type** | any |\n| **Category** | utilities |\n\n## Options\n\n| Option | Description |\n|--------|-------------|\n| `allow_false` | To allow variables to return false instead of the default value, you can use the `allow_false` parameter. |\n\n## Examples\n\n\n```liquid\n\n{{ quantity | default: 5 }}\n```\n\n\n**Output:** `5`\n\nIn this example, price is defined, so the default value is not used\n\n\n```liquid\n\n{% assign price = 4.99 %}\n{{ price | default: 2.99 }}\n```\n\n\n**Output:** `4.99`\n\nIn this example, price is empty, so the default value is used\n\n\n```liquid\n\n{% assign price = \"\" %}\n{{ price | default: 2.99 }}\n```\n\n\n**Output:** `2.99`"}