---
title: '|linebreaksbr'
description: converts all newline characters in `value` to `<br>` tags.
date: '2026-08-02'
categories:
  - Filter
  - Coding
canonical: https://www.djangotemplatetagsandfilters.com/filters/linebreaksbr/
doc_link: https://docs.djangoproject.com/en/6.0/ref/templates/builtins/#linebreaksbr
---

# |linebreaksbr

converts all newline characters in `value` to `<br>` tags.

## Documentation

Replaces all newline characters with `<br>` tags.

### Variable

```django
poem = '''Much to his Mum and Dad’s dismay,
Horace ate himself one day.

He didn’t stop to say his grace,
He just sat down and ate his face.

“We can’t have this!” His Dad declared,
“If that lad’s ate, he should be shared.”'''
```

### Template

```django
{{ poem|linebreaksbr }}
```

### Result

```django
Much to his Mum and Dad's dismay,<br>Horace ate himself one day.<br><br>He didn't stop to say his grace,<br>He just sat down and ate his face.<br><br>"We can't have this!" His Dad declared,<br>"If that lad's ate, he should be shared."
```
