UUID Generator

Generate random v4 or time-ordered v7 UUIDs, and inspect any UUID

Generate one or many UUIDs - random version 4 or time-ordered version 7, which sort by creation time and suit database keys - using a cryptographically secure generator. Or paste a UUID to see its version, variant and creation time.
Try an example:

Output will appear here...

About UUID Generator

How it works

  1. Version 4 UUIDs are 122 random bits from your browser's secure random generator, plus 6 fixed bits marking the version and variant.
  2. Version 7 UUIDs start with the current time in milliseconds, then random bits, so they sort in creation order; UUIDs made in the same batch keep their order.
  3. Inspect mode reads the version and variant bits of any UUID, and for time-based versions (1, 6, 7) shows when it was created.

What you need

  • Nothing to generate. To inspect, a UUID in any common form (with or without hyphens, braces or urn:uuid:).

Tips

  • Use v7 for database primary keys: new rows land at the end of the index, which keeps inserts fast.
  • Use v4 when the ID must not reveal when it was created.
  • Microsoft calls UUIDs "GUIDs" and often writes them in {braces} and uppercase.

Limitations

  • UUIDs are unique, not secret - do not use them as passwords or access tokens.
  • v7 UUIDs reveal their creation time to anyone who has them.

Runs in your browser. UUIDs are generated and inspected in your browser.

Frequently asked questions

Can two UUIDs ever be the same?+

In theory yes, in practice no. With 122 random bits you would need to generate about a billion UUIDs per second for 85 years to have a 50% chance of one duplicate.

v4 or v7 - which should I use?+

v7 for database keys and anything you want sorted by time; v4 when the ID should not reveal its creation time. Both are standardised in RFC 9562 (2024).

What is the difference between a UUID and a GUID?+

Nothing technical - GUID is Microsoft's name for a UUID. Windows tools often show them uppercase and in braces.

Are UUIDs safe to use as secret tokens?+

No. They are designed to be unique, not unguessable for every version (v1 and v7 contain timestamps). Use a dedicated random token for secrets.