Generate universally unique identifiers (UUIDs) with a single click.
UUIDs (universally unique identifiers) are 128-bit values used as unique IDs for database rows, distributed system keys, and session tokens — designed so independently generated IDs essentially never collide, without needing a central authority to hand them out.
v4 (random) is the standard choice for almost everything — database primary keys, API tokens, request IDs. v1 (timestamp-based) is useful when you specifically want IDs that sort roughly by creation time.
Not mathematically guaranteed, but the collision probability for v4 UUIDs is astronomically small — you'd need to generate billions of them per second for centuries before a collision became likely.
v4 UUIDs use a cryptographically random source in modern browsers (crypto.randomUUID), so they're reasonable as unguessable identifiers, though a purpose-built token generator is still preferable for authentication secrets.