liminfo

UUID Generator

Free web tool: UUID Generator

122 bits of cryptographic randomness via crypto.randomUUID(). Most widely used.

UUID v5 Namespace Generator

SHA-1-based deterministic UUID. The same namespace + name always produces the same UUID.

UUID Version Comparison

Featurev1v4v5v7
RFC4122412241229562
Time source60-bit GregorianNoneNone48-bit Unix ms
Randomness62 bits (node+clock)122-bit CSPRNGSHA-1 deterministic62-bit CSPRNG
SortablePartiallyNoNoYes (chronological)
DeterministicNoNoYes (same input → same UUID)No
Collision riskLow (clock-based)Very lowNone (deterministic)Very low (time-scoped)
Best for DB PKFairGoodFairExcellent

ULID vs UUID v7

ULID (Universally Unique Lexicographically Sortable Identifier) serves a similar purpose to UUID v7 but uses a different format.

FeatureULIDUUID v7
Format26-char Crockford Base3236-char hyphenated hex
Example01ARZ3NDEKTSV4RRFFQ69G5FAV018f4d2a-3b5e-7c8d-9e0f-1a2b3c4d5e6f
Timestamp48-bit Unix ms (high bits)48-bit Unix ms (high bits)
Random bits80 bits62-bit CSPRNG
StandardizationUnofficial community specIETF RFC 9562 official standard
Monotonic guaranteeYes with monotonic ULIDNot guaranteed within same ms
URL-friendlyYes (no special chars)Partial (hyphens included)
DB supportRequires libraryPostgreSQL pg_uuidv7, etc.
Best forHuman-readable IDs, URL-safeStandard UUID compat, DB PKs

About UUID Generator

The UUID Generator supports three versions: UUID v1 (RFC 4122 timestamp) constructs a 60-bit Gregorian timestamp from Date.now(), adds a random clock sequence, and uses a random node ID instead of MAC address for privacy. UUID v4 (random) uses crypto.randomUUID() for 122 bits of CSPRNG randomness. UUID v7 (RFC 9562, newest) embeds a 48-bit Unix millisecond timestamp in the first 6 bytes with random fill, providing chronological sortability ideal for database primary keys.

Bulk generate 1 to 100 UUIDs at once with configurable format options: uppercase or lowercase hex, with or without hyphens. Results can be copied individually, copied all at once, or downloaded as a TXT file. The built-in UUID validator parses any pasted UUID to detect its version, variant (RFC 4122, NCS, Microsoft, or Future), and extract embedded timestamps from v1 and v7 UUIDs.

An interactive comparison table shows the key differences between v1, v4, and v7: RFC specification, time source, randomness bits, sortability, collision risk, and database primary key suitability. All operations run entirely in the browser using the Web Crypto API with zero server requests.

Key Features

  • UUID v1 generation with Gregorian timestamp, random clock sequence, and random node (privacy-safe)
  • UUID v4 generation using crypto.randomUUID() with 122 bits of CSPRNG randomness
  • UUID v7 generation per RFC 9562 with 48-bit Unix ms timestamp for chronological sorting
  • Bulk generation of 1 to 100 UUIDs per click with adjustable count input
  • Format options: uppercase/lowercase toggle and hyphen inclusion/exclusion
  • UUID validator that detects version, variant, and extracts timestamps from v1/v7
  • Copy All and Download TXT buttons for batch export of generated UUIDs
  • Side-by-side v1/v4/v7 comparison table covering RFC, randomness, sortability, and DB suitability
  • 100% client-side via Web Crypto API — no server requests, no data logging, no account needed

Frequently Asked Questions

What are the differences between UUID v1, v4, and v7?

UUID v1 uses a 60-bit Gregorian timestamp and was the original time-based UUID (RFC 4122). UUID v4 is purely random with 122 bits of CSPRNG randomness and is the most widely deployed version. UUID v7 (RFC 9562, 2024) uses a 48-bit Unix millisecond timestamp with random fill, combining time-sortability with strong randomness. v7 is the recommended choice for new applications, especially database primary keys, while v4 remains excellent for general-purpose unique identifiers.

How does the UUID validator work?

The validator strips hyphens and checks for exactly 32 hex characters. It reads the 13th hex digit (position 12) to determine the version (1-7) and the 17th hex digit (position 16) for the variant: 8-b means RFC 4122/9562, 0-7 means NCS, c-d means Microsoft, e-f means Future. For v1, it reconstructs the Gregorian timestamp from the time-low, time-mid, and time-hi fields. For v7, it reads the first 48 bits as Unix milliseconds. Both are converted to ISO 8601 dates.

Why is UUID v7 better for database primary keys than v4?

UUID v7 embeds a millisecond timestamp in its leading bytes, making new UUIDs always sort after older ones. This chronological ordering reduces B-tree page splits and improves insert performance in PostgreSQL, MySQL, and MongoDB by 2-10x compared to random v4 UUIDs. v4 UUIDs cause random index insertions that fragment B-tree pages and increase write amplification.

How does UUID v1 timestamp encoding differ from v7?

UUID v1 uses a 60-bit Gregorian timestamp counting 100-nanosecond intervals since October 15, 1582. The timestamp is split across three fields in a non-contiguous layout (time-low, time-mid, time-hi-and-version), making v1 NOT naturally sortable. UUID v7 uses a simple 48-bit Unix millisecond timestamp in the first 6 contiguous bytes, ensuring natural byte-order sorting. This is why v7 replaced v1 for modern use cases.

What format options are available?

You can toggle between lowercase (default, e.g., 550e8400-e29b-41d4-a716-446655440000) and uppercase (550E8400-E29B-41D4-A716-446655440000). You can also remove hyphens for a compact 32-character format (550e8400e29b41d4a716446655440000). These options apply to all UUIDs in the current batch and affect both clipboard copy and TXT download.

How many UUIDs can I generate and export at once?

You can generate 1 to 100 UUIDs per click. All results appear in a scrollable list with individual copy buttons. Use "Copy All" to copy all UUIDs as newline-separated text, or "Download TXT" to save them as a text file named uuid-{version}-{count}.txt. The file is generated client-side with no upload.

Is this tool safe for generating production identifiers?

Yes. All generation uses the Web Crypto API (crypto.randomUUID for v4, crypto.getRandomValues for v1 and v7). No UUIDs are transmitted, logged, or stored on any server. The tool runs entirely in your browser, making it safe for generating database keys, API tokens, session identifiers, and any security-sensitive unique identifiers.

What is the collision probability across versions?

UUID v4 has 122 random bits, requiring ~2.71 x 10^18 UUIDs for a 50% collision chance. UUID v7 has 62 random bits per millisecond, so collision risk resets each millisecond — generating millions per ms would be needed for concern. UUID v1 collision risk depends on the clock sequence (14 bits) and is extremely low when using random node IDs. All three versions are practically collision-free for real-world workloads.