Skip to main content
CodeLint.Dev Dev Tools
1 UUID · v4 random
  1. 1 01553cce-1f21-4b5b-89ac-fd2452010238
UUID v1 — Time-based

Encodes the current timestamp (100-ns intervals since 1582-10-15) plus a random node ID. Values generated within the same millisecond are monotonically incremented. Useful when you need to trace when a record was created.

UUID v4 — Random

All 122 significant bits are filled with cryptographically secure random data via crypto.randomUUID(). The most widely used UUID version — ideal for primary keys, session tokens, and correlation IDs where ordering doesn't matter.

UUID v7 — Time-ordered RFC 9562

Embeds a 48-bit Unix millisecond timestamp in the most-significant bits, making UUIDs lexicographically sortable by creation time. Dramatically improves B-tree index performance compared to v4. Recommended for new database primary keys.