Which UUID version should I use?
v1 is the legacy time-based format. v3 and v5 generate a repeatable UUID from a name plus namespace (MD5 and SHA-1 respectively). v4 is random. v6 reorganizes time-based values for sorting, while v7 uses Unix time and random data for chronological ordering.
What each UUID part means
018f6f3a-4bcd-7abc-8def-0123456789ab
└── timestamp ──┘ │ │
│ └─ variant: identifies the RFC UUID layout
└────── version: 1/3/4/5/6/7 = UUID formatA UUID is 128 bits, usually displayed as five hexadecimal groups separated by hyphens. For v3 and v5, the same name and namespace always produce the same UUID. For v4, almost all bits are random. For v1, v6 and v7, the structure contains a timestamp; v7 uses Unix milliseconds. The version and variant bits preserve interoperability.
Are UUIDs secure?
UUIDs are identifiers, not passwords or authorization tokens. Do not use them as a substitute for secrets or access control.