JavaScript
UUID v4 Generator
Generates a RFC 4122 compliant version-4 UUID. Uses crypto.randomUUID() in modern environments (Node 14.17+, all modern browsers) and falls back to a Math.random()-based implementation for older runtimes. The fallback is suitable for non-security-critical IDs such as UI element keys and local correlation IDs.