---
schema_version: "1"
id: 10c9967e6b6992c225e813934da188bd955d02b791108b0df45d635472406f58
title: concatWith
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.11/dw-binaries-functions-concatwith.md
canonical_url: https://docs.mulesoft.com/dataweave/2.11/dw-binaries-functions-concatwith
source_site: docs.mulesoft.com
content_type: documentation
content_hash: d5958ddac8714944ec756af8d3ee82211c76bdb1445c2a1e2370bd1a6bcfabf2
description: MuleSoft Documentation Site
release: "2.11"
latest: false
---
---
product: DataWeave
version: 2.11
---

# concatWith

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

## concatWith(source: Binary, with: Binary): Binary

Concatenates the content of two binaries.

_Introduced in DataWeave version 2.5.0._

### Parameters

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><p><code>source</code></p></td><td><p>Binary</p></td><td><p>The source binary content.</p></td></tr><tr><td><p><code>with</code></p></td><td><p>Binary</p></td><td><p>The binary to append.</p></td></tr></tbody></table>

### Example

This example concatenates two base-16 values into one binary value.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Binaries
output application/dw
---
"CAFE" as Binary {base: "16"} concatWith "ABCD" as Binary {base: "16"}
```

#### Output

```Json
"yv6rzQ==" as Binary {base: "64"}
```

## concatWith(source: Binary, with: Null): Binary

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

## concatWith(source: Null, with: Binary): Binary

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