UUID v7 Generator
UUID v7 starts with a 48-bit timestamp (milliseconds) – making the IDs chronologically sortable. The rest is cryptographic randomness.
UUID v7 – time-sortable
Version 7 of the UUID combines a timestamp with randomness. Unlike the purely random v4, v7 IDs can be sorted chronologically – making them ideal as primary keys in databases (better index locality).
- Structure: The first 48 bits are the Unix timestamp in milliseconds, followed by version and variant bits plus randomness.
- Sortable: Later-generated UUIDs are lexicographically "greater" – good for database indexes.
- Randomness: The random portion comes from the cryptographically secure Web Crypto API.
