UUIDs

UUID values can be created and stored as properties on nodes and relationships.

Only the UUID type is present in Cypher® 5. Although UUID values can still be inserted in and retrieved from the database with Cypher 5 queries using a Neo4j client library version >= 6.2, the Cypher functions to create and store UUID type properties are only available using Cypher 25. If you wish to use UUID values, Cypher 25 is recommended.

The UUID type

The UUID type is a 128-bit identifier, commonly used to uniquely identify objects within a distributed system. In Cypher, UUID values are stored as a dedicated type and can be represented as a hexadecimal string in the format 8-4-4-4-12 (e.g., 550e8400-e29b-41d4-a716-446655440000).

An example UUID value
uuid("550e8400-e29b-41d4-a716-446655440000")

In this example, the string "550e8400-e29b-41d4-a716-446655440000" is a valid representation of a UUID.

Cypher’s UUID type does not guarantee a specific UUID version. See the RFC 9562 Universally Unique IDentifiers (UUIDs) documentation for details on the different UUID versions.

Valid values

A UUID value must follow the standard representation of 32 hexadecimal digits, displayed in five groups separated by hyphens (e.g., 8-4-4-4-12).