Nil UUID Generator
Nil UUID • All 128 Bits Zero
00000000-0000-0000-0000-000000000000
Enclose:
Generate Bulk UUIDs
0 msReady
Max 5,000
Formatting & Structure
Ready
No batch active1-click copy available on each row
Special 128-Bit Zero UUID•RFC 9562 Section 5.9 / RFC 4122 Section 4.1.7
Nil UUID Technical Specification (RFC 9562)
The Nil UUID is a special-case standardized identifier where all 128 bits are explicitly set to zero (00000000-0000-0000-0000-000000000000). It serves as a universal empty value, default sentinel, or uninitialized object placeholder across distributed software systems.
Bitfield Layout & Binary Structure
Detailed 128-bit byte distribution according to RFC standards.
| Field Name | Bit Range | Purpose & Description |
|---|---|---|
| all_bits | 128 bits (0-127) | All 128 bits set to 0. 00000000-0000-0000-0000-000000000000. |
✓
Advantages & Strengths
- •Standardized representation of an empty or unset UUID reference.
- •Avoids null-pointer exceptions in type-safe languages that require non-null UUID structs.
- •Naturally sorts before all other valid UUIDs in standard binary comparisons.
!
Considerations & Trade-offs
- •Not globally unique; must never be assigned as an active entity primary key.
Best Recommended For
- →Default struct initializers in Go, C#, C++, Rust, and Java.
- →Foreign key placeholders indicating "no parent" or unassigned relations.
- →Testing, mocking, and sentinel value checking.
When to Avoid
- ✕Actual records, sessions, or unique object instances.
Code Implementation Examples
Constant ValueTypeScript
export const NIL_UUID = '00000000-0000-0000-0000-000000000000';
function isNil(id: string): boolean {
return id === NIL_UUID;
}Go uuid.NilGo
package main
import (
"fmt"
"github.com/google/uuid"
)
func main() {
fmt.Println(uuid.Nil) // 00000000-0000-0000-0000-000000000000
}Frequently Asked Questions
What is the Max UUID?▼
RFC 9562 also standardizes the opposite of Nil UUID: the Max UUID (ffffffff-ffff-ffff-ffff-ffffffffffff), where all 128 bits are set to 1. It is often used as a ceiling sentinel value in range queries.
Is Nil UUID valid in PostgreSQL?▼
Yes. PostgreSQL fully supports the Nil UUID in native uuid columns: SELECT 00000000-0000-0000-0000-000000000000::uuid;