---
title: "random(using:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/uuid/random(using:)"
---

# random(using:)

Generates a new random UUID.

## Declaration

```swift
static func random(using generator: inout some RandomNumberGenerator) -> UUID
```

## Parameters

- `generator`: The random number generator to use when creating the new random value.

## Return Value

Return Value A random UUID.
