Free tools, Developers

UUID generator

Generate one or many UUIDs, pick the format and copy. Paste a UUID below to see its version and timestamp.

Questions

v4 or v7: which UUID should I use?

v7 for database primary keys: it starts with a timestamp, so new rows are stored in order and indexes stay fast. v4 is fully random and fine for everything else, like file names, tokens and request IDs.

Can two UUIDs ever be the same?

In practice, no. A v4 UUID has 122 random bits. You would need to generate about a billion per second for 85 years to have a 50% chance of a single duplicate.

Are these UUIDs random enough for security?

They come from your browser’s cryptographic random generator. Even so, don’t use a UUID as the only secret for anything important; use a proper token designed for that.

More developers tools

All 55 free tools