---
title: '|pluralize'
description: returns a pluralization suffix.
date: '2026-08-02'
categories:
  - Filter
  - String
canonical: https://coolify.djangotemplatetagsandfilters.com/filters/pluralize/
doc_link: https://docs.djangoproject.com/en/6.0/ref/templates/builtins/#pluralize
---

# |pluralize

returns a pluralization suffix.

## Documentation

If the value is not 1, '1', or an object of length 1, the `pluralize` filter outputs an “s” or the value of the `suffix` argument if one is used.

### Variable

```django
classes = {
    'Python': [
        'Intro Python', 'Advanced Python', 'Data Science', 'Django'
    ],
    'Databases': [
        'Intro PostgreSQL', 'Intro MySQL', 'Intro SQL Server', 'Intro Oracle'
    ],
    'Web': [
        'HTML', 'CSS', 'JavaScript'
    ],
    'XML': [
        'Intro XML'
    ]
}
```

### Template

```django
<ol>
  {% for category, titles in classes.items %}
    <li>
      {{ category }}: {{ titles|length }}
      class{{ titles|pluralize:"es" }}
    </li>
  {% endfor %}
</ol>
```

### Result

```django
<ol>
  <li>Python: 4 classes</li>
  <li>Databases: 4 classes</li>
  <li>Web: 3 classes</li>
  <li>XML: 1 class</li>
</ol>
```

## Commentary

Super useful. Much easier and cleaner than using conditional expressions to decide when to pluralize a word.
