---
title: '|striptags'
description: strips HTML tags.
date: '2026-08-02'
categories:
  - Filter
  - Coding
canonical: https://www.djangotemplatetagsandfilters.com/filters/striptags/
doc_link: https://docs.djangoproject.com/en/6.1/ref/templates/builtins/#striptags
---

# |striptags

strips HTML tags.

## Documentation

Strips HTML tags.

### Variable

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

### Template

```django
{{ poem_html|striptags }}
```

### Result

```django
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.”
```

## Commentary

This can be useful for converting a template HTML email to text when you want to send both HTML and text version of an email.
