What a UUID is
A Universally Unique Identifier is a 128-bit value usually shown as 36 characters with hyphens—8-4-4-4-12 hex groupings. The format is standardized so databases, log aggregators, and microservices agree on syntax when labeling records.
UUIDs are not guaranteed unique by mathematics alone; they are unique with overwhelming probability when generated correctly. Collisions matter only at scales far beyond typical web apps if random versions use quality entropy.
Unlike sequential integers, UUIDs need no central allocator. Two services can mint IDs independently without coordination—a reason they dominate sharded databases and client-side offline creation.
String representation is 36 characters with hyphens—plan VARCHAR(36) columns or native UUID types per database vendor guidance.
Testing collision handling with billions of rows is unnecessary for most apps—statistical uniqueness suffices until you approach volumes where birthday paradox math matters.