AG UUID

UUID v4 v4 · random

The most widely used standard UUID, built from 122 random bits.

Overview

Aside from the 6 bits marking the version and variant, all 122 bits are random. Its collision probability is effectively zero, making it suitable for most uses.

Structure

Bit length122 random
Character length36
Formathex 8-4-4-4-12
SortableNo
Random-basedYes

When to use

Use it by default for general unique identifiers with no special sorting or reproducibility needs. For database primary keys, also consider v7 for its sorting advantage.

Example

UUID v4
3f2a9c8b-4d1e-4a7b-9c2d-1e2f3a4b5c6d

Generate this format

View per-language code →