---
schema_version: "1"
id: 4ef3909f9333b657e33a165cd4f12b2fbd0b2e02f811cd0ce61985a8d89a1b58
title: isBlank
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-core-functions-isblank.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-core-functions-isblank
source_site: docs.mulesoft.com
content_type: documentation
content_hash: fad2f0c7a54c467d4a924596df80e2f9ea4fda58e6eef1877cf9766e175a63ba
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

# isBlank

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

## isBlank(text: String | Null): Boolean

Returns `true` if the given string is empty (`""`), completely composed of whitespaces, or `null`.
Otherwise, the function returns `false`.

### 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>An input string to evaluate.</p></td></tr></tbody></table>

### Example

This example indicates whether the given values are blank. It also uses the `not` and `!` operators
to check that a value is not blank. The `!` operator is supported starting in Dataweave 2.2.0. Use
`!` only in Mule 4.2 and later versions.

#### Source

```DataWeave
%dw 2.0
output  application/json
var someString = "something"
var nullString = null
---
{
  // checking if the string is blank
  "emptyString" : isBlank(""),
  "stringWithSpaces" : isBlank("      "),
  "textString" : isBlank(someString),
  "somePayloadValue" : isBlank(payload.nonExistingValue),
  "nullString" : isBlank(nullString),

  // checking if the string is not blank
  "notEmptyTextString" : not isBlank(" 1234"),
  "notEmptyTextStringTwo" : ! isBlank("")
}
```

#### Output

```JSON
{
  "emptyString": true,
  "stringWithSpaces": true,
  "textString": false,
  "somePayloadValue": true,
  "nullString": true,
  "notEmptyTextString": true,
  "notEmptyTextStringTwo": false
}
```
