UUID v4 vs v7: how to generate them and which one to use

A UUID is a 128-bit identifier written like 3f2b8c1e-.... It lets different systems create IDs without coordinating. UUID generator makes them in bulk.

Steps

  1. Choose How many (default 5) and the Version (v4 or v7).
  2. Tick Uppercase or untick Include hyphens if your system needs it.
  3. Generate and copy the list.

v4 or v7?

  • v4 is fully random. It is the classic choice and reveals nothing about when it was created.
  • v7 starts with a timestamp, so newer IDs sort after older ones. Databases handle that more efficiently because new rows are inserted at the end of an index rather than at random places.

Choose v7 for database primary keys in new systems; choose v4 when you do not want IDs to leak creation time.

Facts worth knowing

  • Collisions are astronomically unlikely, not impossible. For most applications you can ignore them.
  • A v7 UUID includes a millisecond timestamp. Convert it with Timestamp converter.
  • UUIDs are identifiers, not secrets. Do not use them as passwords or tokens that grant access; use Password generator for secrets.

Formatting

Most systems expect lowercase with hyphens (8-4-4-4-12). Remove the hyphens only for systems that store the 32-character form.

All guides

↑ ↓ navigateEnter openEsc close