Developer & Data

Generate Random UUIDs for New Records

Updated

A record identifier should not depend on the next person guessing a sequence. A random UUID offers a convenient identifier format when a system accepts UUID version 4 values.

UUID Version 4 Generator creates those values using PHP random bytes. Select how many you need, within the tool's bounded count, and download the generated list.

Read the shape, not the randomness

A version 4 UUID is written as five hexadecimal groups separated by hyphens. The version digit begins the third group with 4. The variant bits also constrain part of the fourth group.

Two runs should normally produce different lists. Random output is not expected to match an example value in an article, and rerunning the tool does not reproduce the previous identifiers.

A request for 10 values returns 10 identifiers. The tool allows at most 100 in one run. Generate only the number you intend to use so a discarded list is not confused with a committed import.

Your database still needs a rule

A UUID is an identifier, not an access password. If an application exposes a private record whenever someone supplies its ID, a random format does not replace the required authorisation checks.

The chance of an accidental collision is small for a correctly generated random UUID, but a database should still enforce uniqueness where the record model requires it. The generator does not reserve these values in your application.

This tool creates version 4 values. It does not produce time ordered UUIDs or encode a customer's name, location or timestamp in them.

Keep generated identifiers with the data import they belong to. If an import partly succeeds, review which IDs were actually stored before generating another set. A fresh list cannot automatically reconcile records created by the earlier attempt.

Reference: UUID format specification.

Join the conversation

Your email address will not be published. Required fields are marked *

Explore Whatson tool information