What is a UUID? Comparing UUID v4, v7, and Unique Identifiers
A UUID (Universally Unique Identifier) is a 128-bit number formatted as 32 hexadecimal digits separated by hyphens (e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479). It enables distributed software systems to generate primary keys independently without central coordination.
UUID Version 4: Pure Cryptographic Randomness
UUID v4 relies entirely on cryptographically secure random numbers. With $2^{122}$ available combinations, the probability of generating a duplicate UUID v4 key is so low that it is practically zero in human history.
UUID Version 7: Time-Ordered Performance
While UUID v4 is ultra-secure, its random distribution causes B-Tree index fragmentation in databases like PostgreSQL and MySQL. UUID v7 solves this by embedding a millisecond timestamp prefix, ensuring generated keys sort chronologically and maintain database index locality.
Generate compliant v4 UUIDs instantly with our free client-side UUID Generator.