---
schema_version: "1"
id: 4829a07d0b51c99fd244d291b748dcd731d749d32618387d4718c81b28e2c77f
title: singularize
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.12/dw-strings-functions-singularize.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-strings-functions-singularize
source_site: docs.mulesoft.com
content_type: documentation
content_hash: d94b8fcb2ada933f606860a5950f34db0ddb45fc059556333cc03d7e11fdd675
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# singularize

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## singularize(text: String): String

Converts a plural string to its singular form.

If the input is already singular (for example, "box"), the output will match the input.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>text</code></p></td><td><p>The string to convert to singular form.</p></td></tr></tbody></table>

### Example

This example converts the input string "boxes" to return "box".

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Strings
output application/json
---
{ "singularize" : singularize("boxes") }
```

#### Output

```JSON
{ "singularize" : "box" }
```

## singularize(text: Null): Null

Helper function that enables `singularize` to work with a `null` value.
