{"title":"newline_to_br - Liquid Filter Reference","slug":"newline-to-br-filter-reference","url":"https://support.storeconnect.com/articles/newline-to-br-filter-reference","url_markdown":"https://support.storeconnect.com/articles/newline-to-br-filter-reference.md","subtitle":null,"summary":"Inserts an HTML `\u0026lt;br /\u0026gt;` tag before each newline character in a string. Use `newline_to_br` to preserve line breaks when rendering plain text as HTML.","type":"Developer_Documentation","video_url":"","keywords":"liquid, filters, newline_to_br, text, storeconnect","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"## Description\n\nInserts an HTML line break in front of each newline in a string.\n\n| Property | Value |\n|----------|-------|\n| **Return Type** | string |\n| **Category** | text |\n\n## Examples\n\n\n```liquid\n\n{% capture string_with_newlines %}\nHello\nthere\n{% endcapture %}\n\n{{ string_with_newlines | newline_to_br }}\n```\n\n\n**Output:** `\u003cbr /\u003e\\nHello\u003cbr /\u003e\\nthere\u003cbr /\u003e`"}