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

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