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

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