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

# 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.
