What is the Nil UUID?
The Nil UUID is a special UUID where all 128 bits are set to zero: 00000000-0000-0000-0000-000000000000. It is defined in RFC 4122 (and its successor RFC 9562) as a sentinel value representing "no UUID" — conceptually equivalent to null or None in programming.
Unlike v4, v1, or v7 UUIDs, the Nil UUID is not randomly generated — it is a fixed constant. Every system and language will produce the same value. Its purpose is to fill a UUID-typed field when no meaningful identifier exists yet, or to represent absence in APIs and databases.
Common aliases: Zero UUID, Null UUID, Empty UUID.
When to Use the Nil UUID
Database Fields
When a UUID primary key column must have a value but the record hasn't been assigned a real ID yet. Also used as a default value during schema migrations.
API Responses
APIs that always return a UUID-shaped value may return the Nil UUID to signal "not applicable" — without resorting to null or an empty string.
Testing & Fixtures
Test data and seed fixtures often use the Nil UUID as a predictable placeholder. It's easy to recognize and filter out in test assertions.
Sentinel Values
In distributed systems, the Nil UUID can flag "uninitialized", "unassigned", or "default" state in a way that's unambiguous and format-compatible.
Frequently Asked Questions
Is the Nil UUID the same as null?
Conceptually yes — it plays the same semantic role as null in programming. The key difference is that it's still a valid UUID in terms of format (32 hex digits in the standard pattern), so it can be stored in a UUID-typed column without violating constraints. Using an actual SQL NULL means the field has no value at all; the Nil UUID means "this field has a UUID, and that UUID signals no meaningful identity."
Can I use the Nil UUID as a foreign key?
Only if the referenced table has a row with that exact UUID as its primary key — which it won't unless you create one explicitly. In practice, Nil UUIDs are used in nullable foreign key columns (without a foreign key constraint) or as a sentinel that bypasses the relationship entirely.
What version is the Nil UUID?
The Nil UUID has no version — all bits including the version nibble are zero. If you run it through a UUID validator it will be recognized as a special Nil UUID, not as any numbered version. The UUID Validator on this site handles it correctly.
Recently Generated
Your last 10 outputs are saved locally in your browser.