crypto.randomUUID

Generates a random UUID (Universally Unique IDentifier) v4.

Note

The result is generated using the cryptographically secure random number generator.

Syntax

crypto.randomUUID()

Return value

A string containing UUID. Uses lowercase letters.

Example

crypto.randomUUID()
"4bf11931-0c46-4750-97ff-4ada2ddbe8c9"

See also