Use a UUID v4 when you need a randomly generated identifier for a record or a test fixture. Generate it once, keep it with that record, and let the receiving system enforce uniqueness where required. Generating a fresh value every time a screen loads does not preserve the identity of the same record.

What the v4 label means

The companion UUID v4 generator creates batches of 1 to 1,000 identifiers using the browser’s cryptographic random generator. It sets the required version and variant bits and does not fall back to Math.random(). It generates v4 only, not time-ordered or name-based identifiers.

RFC 9562 defines the UUID formats. A UUID is 128 bits; v4 leaves 122 bits for random data after its fixed version and variant bits. The usual text form has 32 hexadecimal digits separated into groups by four hyphens.

An illustrative v4-shaped identifier
8d3292f0-7348-4c5b-9aac-c847e5b6471d

The third group begins with 4. For this variant, the fourth group begins with 8, 9, a, or b. The example is published here for explanation; generate your own identifiers for actual records.

Generate and keep a useful batch

  1. Enter the required quantity in Number of UUIDs. For a small fixture with six records, enter 6.
  2. Choose Generate UUIDs. Check that the resulting list contains six lines and that every line is a complete identifier.
  3. Copy or download the newline-separated list. Keep it with the fixture or import file.
  4. Assign one identifier to each intended record. If another table refers to a record, reuse that record’s identifier rather than generating a new one for the reference.
  5. Generate another batch only when you need new identities. Save the current batch before reloading the page because the tool does not persist it across reloads.

For JSON test data, place the identifier inside a string, for example "id": "8d3292f0-7348-4c5b-9aac-c847e5b6471d". The existing JSON formatter can check the resulting syntax. It cannot decide whether your application’s references point to the intended records.

Uniqueness remains an application responsibility

With appropriate randomness, accidental v4 collisions are extraordinarily unlikely, but “impossible” is the wrong guarantee. Copying one generated value into two rows is also a duplicate even if the random generator worked perfectly. A database uniqueness constraint and a defined error-handling path protect the actual workflow.

Do not manually edit a few characters to resolve a duplicate. Investigate whether the same record was imported twice, whether an identifier was reused accidentally, or whether a genuinely new record needs a newly generated identifier. The correct choice depends on the data model.

An identifier does not grant permission

A random-looking record ID is not a substitute for authorization. Your application still needs to check whether the current person may read or change the record. This browser utility does not issue passwords, manage API keys, expire tokens, or provide an authentication protocol.

Likewise, v4 values do not provide chronological ordering. Sorting the text of a v4 list does not reconstruct creation time. If ordering or deterministic generation is a requirement, choose an identifier design that explicitly supports it rather than changing the format after generation.

Common mistakes to catch

  • The generator refuses to run: check for a supported browser with crypto.getRandomValues. The tool should stop rather than silently use a weaker fallback.
  • The receiving system rejects a value: check for a copied label, extra quote, line break, missing hyphen, or a requirement for a different UUID version.
  • The list changed: generating again requests new random bytes. Quantity is not a seed that reproduces an earlier list.
  • Related records no longer connect: verify that their identifiers were preserved through export and reimport.

Generation happens in the browser and no account is required by this companion tool. The standalone implementation does not store the batch or send it to a processing service. Once you copy IDs into a dataset, their privacy depends on what that dataset reveals and where you share it.