newline_to_br

Insert HTML break elements (<br />) before each newline character in a multiline string.

Syntax

{{ multiline_string | newline_to_br }}

Example

{% assign notes = "Line 1 Line 2" %}{{ notes | newline_to_br }}

Output

Line 1&lt;br /&gt; Line 2

The newline_to_br filter detects newline characters in text strings and inserts an HTML <br /> break tag before each one, preserving paragraph formatting in HTML view.

In programmatic keyword generation, newline_to_br displays multiline address blocks or policy disclaimers from spreadsheet cells without losing line breaks. For example: {{ row.office_address | newline_to_br }}. This renders mailing addresses cleanly in structured footer cards across every generated city landing page.

Try this syntax in the editor.