Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fuuid%2Fisuuid.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fuuid%2Fisuuid.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# `isUuid`

## Description

Returns `true` if a given string is a valid UUID, otherwise returns `false`.

Use `isUuid` to clean data or flag malformed identifiers in logs and datasets.

## Syntax

Like many functions in DataPrime, `isUuid` supports<!-- --> [two notations](https://docs-docusaurus.kinsta.page/dataprime/language-reference/functions-reference/.md),<!-- --> **function** and **method**. These interchangeable forms allow flexibility in how you structure expressions.

* Function notation
* Method notation

```
isUuid(uuid: string): bool
```

```
(uuid: string).isUuid(): bool
```

## Arguments

| Name   | Type     | Required | Description              |
| ------ | -------- | -------- | ------------------------ |
| `uuid` | `string` | **true** | The candidate UUID value |

## Example

**Use case: Flag invalid or corrupted UUIDs**

Suppose you want to validate whether UUID fields are well-formed. Consider these documents:

```
{

  "uuid": "0b954eed-de4a-4304-a398-16fbb09cd7e3"

},

{

  "uuid": "0b954eed-de4a-4304-a398-1"

}
```

The first value is a valid UUID, while the second is truncated and invalid. You can flag these issues with `isUuid`:

### Example query

* Function notation
* Method notation

```
create is_uuid from isUuid(uuid)
```

```
create is_uuid from uuid.isUuid()
```

### Example output

```
{

  "uuid": "0b954eed-de4a-4304-a398-16fbb09cd7e3",

  "is_uuid": true

},

{

  "uuid": "0b954eed-de4a-4304-a398-1",

  "is_uuid": false

}
```
