AG UUID

UUID v7 v7 · time-sortable

The latest UUID, storing Unix milliseconds in the first 48 bits so it sorts chronologically.

Overview

It appends random bits after the timestamp to satisfy both uniqueness and ordering. It is the latest version standardized in RFC 9562.

Structure

Bit length128
Character length36
Formathex 8-4-4-4-12
SortableYes
Random-basedPartial

When to use

Especially useful where insertion-order sorting matters, such as database primary keys and indexes. Recommended as the default choice for new systems.

Example

UUID v7
018f2e6b-6a3c-7c9a-b1e2-3d4e5f6a7b8c

Generate this format

View per-language code →