---
title: NEWLINE_TO_BR
url: https://www.tines.com/docs/formulas/functions/newline-to-br/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/docs/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# NEWLINE_TO_BR

*[View on tines.com](https://www.tines.com/docs/formulas/functions/newline-to-br/)*

Replaces every newline (\n) with an HTML line break (&lt;br&gt;).

**Categories:** Text

## Syntax

```
NEWLINE_TO_BR(text)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "message": "Hello\nWorld\n!"
  }
}
```

Formula:

```
NEWLINE_TO_BR(my_action.message)
```

Output:

```json
"Hello<br />\nWorld<br />\n!"
```

## Sample actions

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "1",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "text": "Hello martin,\n\nYou hit a phishing site.\n\nDon't click on anything\n"
        }
      },
      "position": {
        "x": -6690,
        "y": -1275
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "NEWLINE TO BR",
      "description": "",
      "options": {
        "recipients": [
          "recipients@email.com"
        ],
        "reply_to": "replyto@email.com",
        "sender_name": "Sender Name",
        "subject": "Example email from Tines",
        "body": "<<NEWLINE_TO_BR(my_action.text)>>"
      },
      "position": {
        "x": -6690,
        "y": -1200
      },
      "type": "email",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "NEWLINE TO BR",
      "description": "",
      "options": {
        "recipients": [
          "recipients@email.com"
        ],
        "reply_to": "replyto@email.com",
        "sender_name": "Sender Name",
        "subject": "Example email from Tines",
        "body": "<<REPLACE(my_action.text, \"\\n\", \"<br>\")>>"
      },
      "position": {
        "x": -6465,
        "y": -1200
      },
      "type": "email",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "NEWLINE TO BR",
      "description": null,
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "example": "<<NEWLINE_TO_BR(my_action.text)>>"
        }
      },
      "position": {
        "x": -6930,
        "y": -1200
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 2
    },
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    },
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 3
    }
  ],
  "diagramNotes": []
}
```
