UUID v7 Generator - Create Unix Epoch Time-Based UUIDs

Generate Unix timestamp-based UUID version 7 online. Create modern UUIDs that are millisecond-precise and time-ordered for optimal database usage.

Try these examples:

What is UUID v7?

UUID version 7 is a time-ordered 128-bit identifier (36-char string) proposed in the new UUID specification draft. It consists of:

  • Unix timestamp: 48 bits of millisecond precision Unix time
  • Random data: 74 bits of random data
  • Version and variant bits: 6 bits for format identification

Format example: 017f22e2-79b0-7cc3-98c4-dc0c0c07398f

How UUID v7 works

  1. Get current Unix timestamp in milliseconds (48 bits)
  2. Generate 74 bits of cryptographically strong random data
  3. Set version bits to 0111 (version 7)
  4. Set variant bits to 10 (RFC 4122 standard)
  5. Assemble as 32 hex digits with hyphens: 8-4-4-4-12 format

Advantages & Considerations

AdvantagesConsiderations
  • Lexicographically sortable
  • No privacy concerns
  • Embedded Unix timestamp
  • Simplified for databases
  • Draft specification status
  • Limited timestamp resolution (ms)
  • Limited support in legacy systems
  • Cannot go back before 1970

UUID v7 Structure

BitsContent
0-47Unix timestamp (milliseconds)
48-51Version (0111 for v7)
52-63Random data
64-65Variant (10 for RFC4122)
66-127Random data

UUID v7 vs. other versions

VersionBased onUse casePrivacy
UUID v1Time + MACTime-ordered IDs⚠️ Reveals MAC
UUID v3Namespace + MD5Deterministic IDs✅ Private
UUID v4RandomSecure random IDs✅ Private
UUID v5Namespace + SHA-1Deterministic IDs✅ Private
UUID v6Time (reordered)Sortable IDs⚠️ Reveals MAC
UUID v7Time + randomSortable IDs✅ Private

Common Use Cases

  • Database primary keys: Efficient indexes
  • Distributed systems: Time-ordered without coordination
  • Modern applications: Privacy-focused identifiers
  • Microservices: Sortable cross-service IDs
  • Event sourcing: Chronological event IDs
  • Data warehousing: Time-ordered analytics IDs

Frequently Asked Questions

What's the advantage of UUID v7 over v1 or v6?

UUID v7 uses Unix timestamp milliseconds and random data rather than MAC addresses, offering privacy protection while maintaining sortability by generation time.

Is UUID v7 an official standard?

UUID v7 is currently a draft specification in the proposed RFC 4122bis document. It's not yet an official RFC standard but is implemented in many UUID libraries.

Can I extract the creation time from UUID v7?

Yes. The Unix timestamp in milliseconds can be extracted from the first 48 bits and converted to a standard datetime.

Are UUIDs v7 sortable by creation time?

Yes. UUID v7 is designed to be lexicographically sortable, with the Unix timestamp in the most significant bits, allowing direct string comparison to match chronological order.

Does UUID v7 expose any system information?

No. Unlike v1/v6, UUID v7 does not use MAC addresses. It combines timestamp with random data, protecting privacy while maintaining sortability.

Resources