tools/generate/uuid generator
// generate

uuid generator

v4, v7, nanoid, custom

← template
// client-only · webcrypto

              curl -s 'https://api.whittly.dev/v1/uuid?version=4&count=5' \
  -H 'Authorization: Bearer $WHITTLY_API_KEY'
            

              const res = await fetch(
  'https://api.whittly.dev/v1/uuid?version=4&count=5',
  { headers: { Authorization: 'Bearer ' + apiKey } }
);
const data = await res.json();
            

              const { data } = await axios.get(
  'https://api.whittly.dev/v1/uuid?version=4&count=5',
  { headers: { Authorization: 'Bearer ' + apiKey } }
);
            
// propersistent presetspro·history syncproupgrade →

// about this tool

UUIDs (Universally Unique Identifiers) are 128-bit identifiers designed to be unique across time and space without a central coordinator. v4 UUIDs are random, v7 UUIDs are time-ordered (better for database primary keys), and NanoID generates shorter URL-safe IDs.

// when to use

  • Generate primary keys for database records
  • Create idempotency keys for API requests
  • Generate unique filenames for uploaded assets
  • Create correlation IDs for distributed system tracing

// faq

Should I use v4 or v7 for database IDs?
v7 is generally better for databases because it is time-ordered, which means new records are always inserted at the end of a B-tree index — avoiding page splits and fragmentation that occur with random v4 UUIDs.
How unique are UUIDs really?
A v4 UUID has 122 bits of randomness. The probability of generating two identical UUIDs is astronomically small — around 1 in 2^61 even after generating a billion UUIDs per second for a century.
// history
Pro Cloud Sync — upgrade
no operations yet