Skip to content
Toolore

Developer Tools

UUID Generator

Generate UUIDs using your browser's cryptographic random source. Version 4 is the familiar random one; version 7 puts a timestamp in the leading bits so the values sort chronologically, which makes a real difference when they are used as database keys.

Which version should I use?

Version 4 is random and the safe default. Version 7 puts a timestamp in the first 48 bits, so the values sort chronologically — that keeps a database index compact when UUIDs are used as primary keys, where random v4 values scatter inserts across the index. Generation here uses your browser's cryptographic random source, never Math.random.

How to use this tool

  1. Choose the version you need.
  2. Set how many to generate, up to 500 at a time.
  3. Press Generate again for a fresh batch, and copy them all with one click.

Notes and limitations

  • Randomness comes from crypto.getRandomValues, never Math.random. Math.random is not a cryptographic generator and its future output can be predicted from previous values in some engines.
  • Version 4 has 122 random bits. Collisions are not a practical concern — you would need to generate billions before the probability became worth thinking about.
  • Version 7 encodes the Unix time in milliseconds in its first 48 bits. Because the values are ordered, database inserts append to the index rather than scattering across it, which keeps write performance and index size much better than v4 for primary keys.
  • Version 7 leaks the creation time of the record. That is usually harmless and sometimes useful, but it is a real consideration for identifiers exposed publicly.
  • The nil UUID, all zeroes, is a valid value normally used to mean 'no UUID' rather than as an identifier.
  • Everything runs in your browser and nothing is uploaded. That said, treat any third-party website with caution when handling production data — if a value would cause real damage if leaked, process it with your own local tooling instead.

Frequently asked questions

What is the difference between UUID v4 and v7?

Version 4 is entirely random. Version 7 begins with a millisecond timestamp, so values generated later sort after earlier ones. Use v4 when the identifier should reveal nothing, and v7 when it will be a database primary key.

Can two UUIDs be the same?

In theory, but not in practice. A version 4 UUID has 122 random bits, and the chance of a collision stays negligible even across billions of values.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit identifier. The only difference you may notice is that Microsoft tooling often wraps them in braces.

Are these safe to use as security tokens?

A version 4 UUID is generated from a cryptographic source, so it is unpredictable. Even so, a purpose-built token of appropriate length is a better choice — and version 7 is unsuitable, because part of it is a predictable timestamp.