What is a UUID v6 Generator
A UUID v6 takes the same 60-bit timestamp as v1 but places it in the most significant bits (big-endian), so lexicographic string order matches chronological order. This makes v6 ideal for database primary keys where insertion order matters.
v6 is part of RFC 9562, the 2024 update that added v6, v7 and v8. It keeps the same 48-bit node field as v1 but never exposes a real MAC unless you supply one.
How to
- Set how many UUIDs you need (1–1000).
- Toggle uppercase, hyphens and braces.
- Press Generate to compute time-ordered v6 values.
Use cases
- Primary keys in databases that benefit from monotonic insertion.
- Migration paths from v1 systems that need chronological sort.
- Event stores where order must be preserved in the ID.
Compare UUID v6 Generator with other formats
| Option | When to use |
|---|---|
UUID v6 | v1 timestamp reordered; sorts by time |
UUID v7 | Millisecond time + random; modern default |
UUID v1 | Original layout; timestamp in middle fields |
Code examples
JavaScript
import { v6 } from 'uuid';
const id = v6(); // time-ordered, v1-compatible
Python
# PyUUID / uuid6 library
from uuid6 import uuid6
id = uuid6()
Frequently asked questions
How is v6 different from v1?
They share the same timestamp and node, but v6 puts the timestamp in the leading bytes so IDs sort chronologically as strings. v1 scatters the time across fields, breaking string sort.
Is v6 better than v7?
v7 is generally preferred for new projects because its millisecond precision and random tail are simpler and well-supported. v6 exists for compatibility with v1-era sorting needs.
Does v6 leak the MAC address?
No — like v1 on this site, the node field is random, not your real MAC.