UUIDsEnterprise EditionIntroduced in Neo4j 2026.08
UUID values can be created and stored as properties on nodes and relationships.
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).
UUID valueuuid("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.
|
You can convert UUID values into STRING values with the toString() function.
|
Construct UUID values
To construct a UUID value, use the uuid() function.
UUID value from a STRING value.RETURN uuid("550e8400-e29b-41d4-a716-446655440000") AS uuid
| uuid |
|---|
|
Rows: 1 |
UUID value using parametersSTRING){
"uuidAsString": "550e8400-e29b-41d4-a716-446655440000"
}
RETURN uuid($uuidAsString) AS uuid
| uuid |
|---|
|
Rows: 1 |
Store UUID values as propertiesEnterprise Edition
To store a UUID value as a node or relationship property, use the uuid() function and a write clause.
Storing UUID values requires the database to use block format.
This is the default on Aura instances.
Community Edition cannot store UUID values as properties.
|
UUID propertyCREATE (n:Label {uuidProp: uuid("550e8400-e29b-41d4-a716-446655440000")})
RETURN n.uuidProp AS uuidProp
| uuidProp |
|---|
|
Rows: 1 |
UUID property using parameters{
"uuidString": "550e8400-e29b-41d4-a716-446655440000"
}
CREATE (n:Label {uuidProp: uuid($uuidString)})
RETURN n.uuidProp AS uuidProp
| uuidProp |
|---|
|
Rows: 1 |
UUIDs and client libraries (drivers)
Working with uuids via Neo4j’s client libraries results in a different behavior depending on the library version.
-
Versions >= 6.2 — UUIDs are fully supported and mapped into client types (see the Data types page of each language manual).
-
Versions < 6.2 — UUIDs can be created, attached, and manipulated in queries via Cypher functions, but cannot be returned nor created in the application.
It is possible to create and store values as shown in the Store UUID values as properties examples, but returning aUUIDresults in a placeholderMAPvalue and a warning.Result of returning aUUIDwith a driver older than 6.2+------------------------------------------------------------------------------------------------------+ | n.uuid | +------------------------------------------------------------------------------------------------------+ | {originalType: "UUID("550e8400-e29b-41d4-a716-446655440000")", reason: "UNKNOWN_TYPE"} | +------------------------------------------------------------------------------------------------------+ warn: One or more values returned could not be handled by this version of the driver and were replaced with placeholder map values. Please upgrade your driver! 03N95 (Neo.ClientNotification.UnknownType)