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

# camelize

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

## camelize(text: String): String

Returns a string in camel case based on underscores in the string.

All underscores are deleted, including any underscores at the beginning of the string.

### 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 camel case.</p></td></tr></tbody></table>

### Example

This example converts a string that contains underscores to camel case.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Strings
output application/json
---
{
  "a" : camelize("customer_first_name"),
  "b" : camelize("_name_starts_with_underscore")
}
```

#### Output

```JSON
{
   "a": "customerFirstName",
   "b": "nameStartsWithUnderscore"
 }
```

## camelize(text: Null): Null

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