UUID · 00000000-0000-0000-0000-000000000000

Nil UUID

00000000-0000-0000-0000-000000000000, the all-zero UUID.

Key facts

Value00000000-0000-0000-0000-000000000000
MeaningAbsence of a value
VersionNone
Common usePlaceholder or sentinel
RiskConfused with a real uninitialized key

A sentinel, not an ID

The nil UUID has no version or variant bits set and is defined as a special value. Use it only to represent “no UUID” explicitly. Never generate it, and never insert it into a column that is supposed to identify a row.

Defensive handling

Validate incoming identifiers against the nil value before lookup. Some APIs and ORMs treat it as the zero value, which can turn a missing field into a query for a real row if such a row exists. Rejecting nil at the boundary avoids that class of bug.

Frequently asked questions

Is the nil UUID valid?

It is a valid UUID value but not a generated identifier. It is reserved for the absence of a value.

Can it collide with a generated UUID?

No practical generator produces it, because the version and variant bits would have to be zero.

Should a database allow it?

Only if the schema needs a sentinel. Otherwise reject it at the API boundary.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.