Developer Tools for Random Data Generation // v2.13.1
root@generate-random:~/uuid-v1$ _

Random UUID v1 Generator

Generate time-based UUID version 1 identifiers with timestamp and node components - perfect for ordered, sortable unique identifiers

Our UUID v1 generator creates time-based universally unique identifiers using RFC 4122 standards. Generate UUID version 1 with embedded timestamps and node identifiers for chronologically sortable unique IDs. Perfect for database primary keys requiring time-based ordering, distributed systems, event tracking, and applications requiring time-ordered unique identifiers with guaranteed global uniqueness across systems.

What is UUID v1?

UUID v1 (Universally Unique Identifier version 1) is a time-based identifier defined in RFC 4122. It combines a 60-bit timestamp (100-nanosecond intervals since October 15, 1582), a 14-bit clock sequence, and a 48-bit node identifier (typically a MAC address or randomly generated value). This structure ensures both uniqueness and chronological orderability - UUIDs generated later will have higher values when sorted lexicographically, making them ideal for time-series data and chronologically ordered database records.

The format is 32 hexadecimal digits displayed in 5 groups: 8-4-4-4-12 (e.g., 550e8400-e29b-11d4-a716-446655440000). The timestamp component allows deriving the exact creation time, while the node identifier component ensures global uniqueness across machines. UUID v1 is particularly valuable in distributed systems where multiple servers generate IDs independently, and applications requiring both uniqueness guarantees and time-based sorting capabilities for efficient database indexing and event sequencing. However, for new projects, UUID v7 is recommended as it offers similar benefits with better timestamp precision and no MAC address exposure.

UUID v1 Configuration Options

Quantity (1-100 UUIDs)

Generate multiple UUID v1 identifiers simultaneously for batch operations, database seeding, or bulk unique ID generation. Each UUID includes a unique timestamp ensuring sequential ordering even when generated in rapid succession.

Time-Based Generation

UUIDs are generated with precise timestamps using 100-nanosecond intervals since the UUID epoch (October 15, 1582). The embedded timestamp makes UUID v1 ideal for time-series databases, event logs, and applications requiring chronological sorting without additional timestamp fields.

How to Generate UUID v1

[STEP 1] Set Quantity

Choose how many UUID v1 identifiers to generate (1-100). Each UUID will have a unique timestamp, ensuring sequential ordering even in bulk generation.

[STEP 2] Generate Instantly

Click EXECUTE GENERATION to create time-based UUIDs. Each identifier includes an embedded timestamp and node ID for guaranteed uniqueness and chronological sortability.

[STEP 3] Copy & Use

Click individual UUIDs to copy them instantly, or use the export buttons to download all UUIDs as TXT, CSV, or JSON for database insertion, API integration, or application configuration.

[STEP 4] Integrate

Use UUID v1 for database primary keys (sortable by creation time), distributed event IDs, audit log entries, or any application requiring both uniqueness and time-based ordering without additional timestamp columns.

UUID v1 Best Practices

  • _ Privacy Consideration - UUID v1 may include MAC addresses which could expose hardware information. Modern implementations often use random node IDs instead. For privacy-sensitive applications, use UUID v4 (random) or v7 (time-ordered without MAC).
  • _ Sortability - Leverage UUID v1's time-based nature for database indexes. UUIDs sort chronologically, improving query performance for time-series data without requiring separate timestamp indexes.
  • _ Distributed Systems - UUID v1 excels in distributed architectures where multiple systems generate IDs independently without coordination or central ID server, thanks to node ID uniqueness.
  • _ Clock Synchronization - Ensure system clocks are synchronized across distributed nodes using NTP to maintain proper chronological ordering of generated UUIDs.
  • _ Migration from Sequential IDs - UUID v1 is useful when migrating from auto-increment IDs while maintaining sortability for existing queries and indexes that depend on chronological ordering.
  • _ Consider v7 for New Projects - For new implementations, UUID v7 offers better timestamp precision (milliseconds in prefix), improved database index performance, and avoids MAC address exposure while maintaining sortability benefits.

UUID v1 Generation Algorithm

UUID v1 follows RFC 4122 specification, combining timestamp, clock sequence, and node ID to ensure both uniqueness and chronological ordering:

// UUID v1 Structure (128 bits total)
Algorithm: Time-Based UUID Generation

// Component Breakdown:
timestamp_low (32 bits) - Low field of timestamp
timestamp_mid (16 bits) - Middle field of timestamp
timestamp_hi_version (16 bits) - High field + version (0001)
clock_seq_variant (16 bits) - Clock sequence + variant bits
node (48 bits) - MAC address or random node ID

// Timestamp Calculation:
// 100-nanosecond intervals since UUID epoch (1582-10-15)
uuid_epoch = -12219292800 seconds (Unix epoch offset)
current_time_100ns = (current_unix_time - uuid_epoch) × 10,000,000

// Clock Sequence:
// 14-bit counter for handling clock adjustments and duplicates
// Increments when timestamp goes backwards or same timestamp reused

// Node Identifier:
// 48-bit value (MAC address or random if MAC unavailable)
// Ensures global uniqueness across distributed systems

// Format: xxxxxxxx-xxxx-1xxx-yxxx-xxxxxxxxxxxx
// where 1 = version, y ∈ {8,9,a,b} = variant
Example: 550e8400-e29b-11d4-a716-446655440000

// Properties:
Sortability: Chronological (with caveats - timestamp fields reordered)
Uniqueness: Guaranteed via timestamp + clock_seq + node
Privacy: May expose MAC address (use random node for privacy)

UUID v1 API for Developers

Generate UUID v1 identifiers programmatically using our free REST API. Time-based UUIDs with embedded timestamps for chronological sorting.

Example API calls for UUID v1:

  • GET /api/v1/generate/uuids?version=1&count=1 - Generate single time-based UUID
  • GET /api/v1/generate/uuids?version=1&count=100 - Bulk generation for batch operations
  • Response includes formatted UUIDs with timestamp components for time-series applications

All UUIDs generated with 100-nanosecond precision timestamps and unique node identifiers for guaranteed global uniqueness.

GET https://generate-random.org/api/v1/generate/uuids
VIEW FULL API DOCUMENTATION

Frequently Asked Questions

What's the difference between UUID v1 and v4?
UUID v1 is time-based with embedded timestamps and node identifiers, making UUIDs sortable chronologically. UUID v4 is entirely random with no timestamp or node information, offering better privacy but no inherent ordering. Choose v1 for sortable IDs in time-series data and distributed systems, v4 for maximum randomness and privacy, or v7 for modern time-ordered UUIDs without MAC address concerns.
Does UUID v1 expose my MAC address?
Traditional UUID v1 implementations include your network interface's MAC address in the node field, which could be a privacy concern. Modern implementations often use a randomly generated node ID instead of the actual MAC address to protect privacy. If MAC address exposure is unacceptable, use UUID v4 (fully random) or v7 (time-based without MAC address) instead.
Are UUID v1 identifiers sortable?
Yes! UUID v1 includes a timestamp component, so UUIDs generated later will generally sort after earlier ones (note: timestamp fields are reordered in the UUID format, so lexicographic sorting isn't perfectly chronological). This makes v1 useful for database primary keys where you want approximate chronological ordering, improving index performance for time-series queries. For better sortability, use UUID v7 which places the timestamp in the prefix.
Can UUID v1 collide across different machines?
No, collision is virtually impossible. UUID v1 combines timestamp (100-nanosecond precision), clock sequence (handles time rollbacks and duplicates), and node ID (unique per machine via MAC address or random value). Even if two machines generate UUIDs at the exact same nanosecond, the different node IDs ensure uniqueness across distributed systems without coordination.
Should I use UUID v1 or v7 for new projects?
UUID v7 is generally recommended for new projects. It offers time-based sortability like v1 but with better timestamp precision (milliseconds in the prefix for natural lexicographic sorting), improved database index performance, and no MAC address exposure. Use v1 only if you need compatibility with existing RFC 4122 v1 implementations or specific legacy system requirements. For general-purpose random IDs, use v4.
How does UUID v1 handle clock adjustments?
UUID v1 uses a 14-bit clock sequence counter to handle system clock adjustments. If the clock moves backward (e.g., NTP correction) or if multiple UUIDs are generated within the same timestamp interval, the clock sequence increments to maintain uniqueness. This mechanism ensures UUIDs remain unique even during clock skew, time zone changes, or daylight saving time transitions.