Nil UUID
The reserved UUID with all 128 bits set to zero. Defined by RFC 9562 §5.9 as a sentinel for "no UUID" / unset.
Nil UUID
Max UUID (RFC 9562 §5.10)
Detecting the nil UUID in code
JavaScript / TypeScript
import { NIL as NIL_UUID, MAX as MAX_UUID, validate } from 'uuid';
console.log(NIL_UUID); // '00000000-0000-0000-0000-000000000000'
console.log(MAX_UUID); // 'ffffffff-ffff-ffff-ffff-ffffffffffff'
const isNil = (id: string) => id === NIL_UUID;Python
# uuid.UUID(int=0) constructs the nil UUID:
import uuid
NIL = uuid.UUID(int=0)
MAX = uuid.UUID(int=(1<<128) - 1)PostgreSQL
SELECT '00000000-0000-0000-0000-000000000000'::uuid AS nil_uuid;Frequently asked questions
The nil UUID is the special UUID with all 128 bits set to zero: 00000000-0000-0000-0000-000000000000. RFC 9562 §5.9 defines it as a sentinel value that denotes 'no UUID' or 'unset.' It is reserved and should never be confused with an actual generated UUID — no v4 generator will ever produce it (probability ~5.3 × 10^36 against).