--- url: https://developer.youcan.shop/themes/filters/format/default.md --- # Default Returns a default value when the input is `nil`, `false` or an empty string. Without an argument, the default value is an empty string. ```liquid {{ value | default: default_value }} ``` ## Example ::: details Data ```json { "product": { "title": "Hat", "subtitle": null } } ``` ::: ```liquid {{ product.subtitle | default: 'No subtitle' }} {{ product.title | default: 'No title' }} [{{ product.subtitle | default }}] ``` ::: tip Output ```html No subtitle Hat [] ``` :::