---
title: '|wordwrap'
description: inserts newline after every `n` characters.
date: '2026-08-02'
categories:
  - Filter
  - String
canonical: https://coolify.djangotemplatetagsandfilters.com/filters/wordwrap/
doc_link: https://docs.djangoproject.com/en/6.0/ref/templates/builtins/#wordwrap
---

# |wordwrap

inserts newline after every `n` characters.

## Documentation

Implements word wrapping by inserting a newline character every `n` characters. Useful for plain text, but not typically for HTML.

### Variable

```django
blurb_text = 'You are pretty smart!'
```

### Template

```django
{{ blurb_text|wordwrap:10 }}
```

### Result

```django
You are
pretty
smart!
```

In a browser, whitespace is condensed, so the output would be:

You are
pretty
smart!

## Commentary

Useful for plain text, but not typically for HTML.
