The Max UUID (ffffffff-ffff-ffff-ffff-ffffffffffff) is all 128 bits set to 1. It was formally defined in RFC 9562 §5.10, published in May 2024 — it did not exist in the earlier RFC 4122.
What the Max UUID Is
ffffffff-ffff-ffff-ffff-ffffffffffff
- All 32 hex characters are
f - All 128 bits are
1 - No version digit, no variant bits — it is a raw sentinel value
The Max UUID is the direct opposite of the Nil UUID (00000000-0000-0000-0000-000000000000). Together they define the inclusive range of all possible UUID bit patterns.
Use Cases
Range bounds in queries:
The Max UUID is useful as an explicit upper bound when paginating or scanning UUID ranges:
-- All UUIDs in a time range using UUID v7's sortable prefix
SELECT * FROM events
WHERE id BETWEEN '018f0000-0000-7000-8000-000000000000'
AND 'ffffffff-ffff-ffff-ffff-ffffffffffff'
ORDER BY id;
Sentinel for “greater than everything”:
In distributed systems that compare UUIDs, the Max UUID can represent infinity — a cursor position past all real records:
const MAX_UUID = 'ffffffff-ffff-ffff-ffff-ffffffffffff';
// "Give me everything after the last page" — returns nothing
const rows = await db.query(
'SELECT * FROM orders WHERE id > $1 ORDER BY id LIMIT 50',
[MAX_UUID],
);
Testing and boundary validation:
import uuid
NIL_UUID = uuid.UUID(int=0)
MAX_UUID = uuid.UUID('ffffffff-ffff-ffff-ffff-ffffffffffff')
# RFC 9562 §5.9 and §5.10 examples for documentation
assert str(NIL_UUID) == '00000000-0000-0000-0000-000000000000'
assert str(MAX_UUID) == 'ffffffff-ffff-ffff-ffff-ffffffffffff'
Database Storage
The Max UUID stores in any standard UUID column without issue:
-- PostgreSQL uuid column accepts Max UUID directly
INSERT INTO sentinels (id, label)
VALUES ('ffffffff-ffff-ffff-ffff-ffffffffffff', 'max');
-- Works in MySQL BINARY(16) via UUID_TO_BIN too
INSERT INTO sentinels (id, label)
VALUES (UUID_TO_BIN('ffffffff-ffff-ffff-ffff-ffffffffffff'), 'max');
Unlike the Nil UUID, the Max UUID is rarely stored as a real row — it is most often used as a query parameter for range bounds.
Max UUID vs Nil UUID
| Property | Nil UUID | Max UUID |
|---|---|---|
| Value | 00000000-0000-0000-0000-000000000000 | ffffffff-ffff-ffff-ffff-ffffffffffff |
| Bits | All 0 | All 1 |
| Meaning | “No UUID” (minimum) | Upper sentinel (maximum) |
| RFC section | §5.9 | §5.10 |
| Introduced | RFC 4122 (2005) | RFC 9562 (2024) |
Validator Behaviour
Most UUID validators flag the Max UUID as a special case. The version digit at position 13 is f — not a valid version (1–8 are the only defined values). A well-implemented validator should:
- Match the all-ones pattern and return “Max UUID” as a named result
- Not reject it as “invalid” — it is valid per RFC 9562
- Treat it as a sentinel, not a regular generated UUID
Related Resources
- RFC 9562 §5.10 — Max UUID definition
- Nil UUID — the all-zeros complement
- RFC 9562 replaces RFC 4122 — what changed
- UUID byte layout — all 128 bits explained
Frequently asked questions
What is the Max UUID?
The Max UUID is ffffffff-ffff-ffff-ffff-ffffffffffff — all 128 bits set to 1. It is defined in RFC 9562 §5.10 as a sentinel value representing the maximum possible UUID value, complementing the all-zeros Nil UUID. Like the Nil UUID, it has no version or variant bits and should not be used as a real identifier.
What is the nil UUID used for?
The nil UUID (00000000-0000-0000-0000-000000000000) represents the absence of a UUID value — similar to null or zero. It is used as a sentinel value in APIs and data models to indicate "no UUID assigned" without using a null pointer.
What did RFC 9562 add to the UUID standard?
RFC 9562, published in May 2024, adds UUID v6 (reordered timestamp for sortability), v7 (Unix millisecond timestamp), and v8 (custom layout). It also defines the Max UUID sentinel (all-ones complement of the Nil UUID) and deprecates v1 and v2. The existing format and v3, v4, v5 semantics are unchanged.
What is the Max UUID?
The Max UUID is ffffffff-ffff-ffff-ffff-ffffffffffff — all 128 bits set to 1. It is defined in RFC 9562 §5.10 as a sentinel value representing the maximum possible UUID value, complementing the Nil UUID (all zeros) which represents the minimum.
Does the Max UUID have a version or variant?
No. Like the Nil UUID, the Max UUID has no version or variant bits — all bits are simply 1. This means it does not follow the normal 4-bit version and 2-bit variant pattern defined in RFC 9562 §4. A UUID validator that checks the version digit at position 13 will see f — not a valid version. It should be treated as a special sentinel, not a regular UUID.