Skip to content

UUID generator

Make one UUID or thousands, and copy them in one go.

v4 draws 122 random bits from your browser's cryptographic random number generator.

Your files are open only in this tab. Nothing is uploaded.

How to use UUID generator

  1. Select Version and quantity. Choose v4 random or v7 time-ordered under Version, then enter 1 to 10000 in How many.
  2. Pick your output format. Switch Format between Lowercase, Uppercase, No hyphens, and Braces to reformat existing IDs immediately.
  3. Copy or export your batch. Click Generate new to refresh the list, Copy all for the full clipboard batch, or Download to save a text file.
  4. Inspect an existing identifier. Paste any 32-digit hex string, braced GUID, or urn:uuid: value into Check a UUID to read its Version, Variant, and Created time.

Everything runs in this browser tab. Nothing you paste or open is uploaded or logged, so it's safe for keys, tokens and private data.

When should you pick UUID v4 vs v7 for database primary keys?

Use v7 · time-ordered for database primary keys and event streams because its leading 48-bit Unix millisecond timestamp keeps inserts sequential in B-tree indexes. Use v4 · random for public tokens or session IDs where concealing creation time matters more than index locality.

Property UUID v4 (v4 · random) UUID v7 (v7 · time-ordered) Nil / Max UUID
Primary entropy source 122 CSPRNG bits 48-bit timestamp + 12-bit counter + 62 random bits All 0 bits / all f bits
Sort order Unordered (random) Lexicographically chronological Fixed sentinel
B-tree index impact Causes random page splits Appends sequentially at index tail Single sentinel row
Timestamp leakage None Reveals millisecond creation time None
Standard reference IETF RFC 9562 IETF RFC 9562 §5.7 IETF RFC 9562 §5.9–5.10

Why UUID v7 prevents B-tree index fragmentation

Random v4 identifiers scatter new rows across every leaf page of a PostgreSQL, MySQL InnoDB, or SQLite B-tree index. At millions of rows, those random writes increase disk I/O and bloat index memory caches.

By placing the 48-bit millisecond timestamp in the most significant bits, UUID v7 values sort monotonically as strings and 128-bit integers alike. That gives you globally unique client-generated IDs without sacrificing sequential append performance.

When random UUID v4 remains the safer choice

Time-ordered IDs intentionally expose when a record was created, which can leak user signup velocity or invoice volume if exposed in public URLs. When an identifier appears in external share links, v4 hides timing patterns completely.

Remember that neither v4 nor v7 replaces a dedicated secret generator. When you need bearer tokens or credentials with full entropy and custom character sets, create high-entropy authentication secrets instead of relying on standard 122-bit identifiers.

RFC 9562 UUID specification, bit layout, and Web Crypto entropy

Every 128-bit identifier (often called a GUID in Windows and .NET systems) consists of 32 hexadecimal characters separated into 8-4-4-4-12 groups, with 4 bits reserved for the version nibble and 2 bits for the variant. This free browser generator implements both the classic v4 layout and the modern v7 specification directly in JavaScript.

Tip: Switching the Format selector between Lowercase, Uppercase, No hyphens, and {Braces} reformats your current batch immediately without regenerating new random values.

Monotonic 12-bit counters for sub-millisecond v7 batches

Generating 10,000 UUIDs in a tight browser loop produces hundreds of IDs within a single millisecond. Without a tie-breaker, those IDs would sort randomly relative to one another.

Following RFC 9562 §6.2, this tool seeds a 12-bit counter in the rand_a field with 11 random bits and increments it for each subsequent ID in the same millisecond. If the counter reaches 0xfff (4,095) or the system clock steps backward by less than 10,000 milliseconds, the internal millisecond counter advances by 1 to preserve strict monotonic order.

Cryptographic randomness via crypto.getRandomValues

All random bytes come from the browser’s crypto.getRandomValues(new Uint8Array(16)) API documented in the MDN Web Crypto getRandomValues Reference, rather than Math.random(). Each v4 identifier sets the version nibble (0x40) and RFC variant bits (0x80), leaving 122 unpredictable bits.

For systems that need repeatable IDs derived deterministically from an input string or file rather than random entropy, generate deterministic SHA-256 content hashes instead of random UUIDs.

How to inspect UUID version, variant, and embedded timestamps

Paste any existing 32-hex-digit string into Check a UUID to decode its Version, Variant, and embedded Created date without making a server call. The parser automatically strips urn:uuid: prefixes, curly braces, and hyphens before reading the version and variant nibbles.

Decoding v1, v6, and v7 creation timestamps

When you paste a v7 UUID, the inspector reads the first 12 hexadecimal digits (48 bits) as Unix milliseconds and formats the local creation date and time. For legacy v1 and reordered v6 identifiers, it extracts the 60-bit count of 100-nanosecond intervals since October 15, 1582 (12219292800000 ms before the Unix epoch).

To compare an extracted millisecond value against UTC, ISO week numbers, or IANA time zones, you can convert extracted millisecond timestamps into ISO dates in one step. Note that native browser MDN Web Crypto randomUUID Reference calls produce v4 strings, which carry no timestamp field.

Identifying RFC 9562, Microsoft, Nil, and Max variants

Beyond versions 1 through 8, the inspector checks bits 64–67 to classify the variant as NCS (old), RFC 9562, Microsoft (common in COM/.NET GUIDs), or Reserved. It also recognizes the all-zero Nil UUID (00000000-0000-0000-0000-000000000000) and all-f Max UUID sentinel defined in RFC 9562.

Bulk generation formats, 10,000-ID exports, and privacy

When seeding a staging database, preparing SQL migration scripts, or creating test fixtures, you can generate between 1 and 10,000 UUID v4 or v7 identifiers locally in one batch. Everything stays in your browser tab with zero network traffic or account requirements.

  • Four output styles: Toggle Format between Lowercase, Uppercase (common for Windows GUIDs), No hyphens (32 compact hex characters for URLs), and {Braces} ({...} for registry or C# literals).
  • Smooth large-batch previews: Lists above 500 items display the first 500 rows on screen with individual hover Copy buttons, while Copy all and Download (uuids-v4.txt or uuids-v7.txt) export the full count up to 10,000.
  • Database seeding workflows: Export a clean newline-separated .txt file of v7 IDs and pair synthetic IDs with placeholder records for database seeding without touching external APIs.
  • Zero telemetry on generated IDs: Because generation uses local Web Crypto bytes and never sends outputs over the network, production database keys remain private on your machine.

Questions

When should I choose UUID v7 instead of UUID v4?

Choose UUID v7 for database primary keys, event logs, and distributed records that benefit from chronological sorting and sequential B-tree index inserts. Choose UUID v4 when you want fully opaque identifiers that reveal zero creation-time metadata.

Can two generated UUID v4 values collide?

A v4 UUID holds 122 random bits drawn from your browser cryptographic generator, yielding 2^122 possible values. Generating 1 billion UUIDs per second for decades still leaves collision probability negligible compared to hardware failure.

How does UUID v7 maintain sort order within the same millisecond?

The generator embeds a 12-bit monotonic counter in the rand_a field after the 48-bit Unix millisecond timestamp. Multiple IDs created in the same millisecond increment that counter up to 4,095, and if it saturates, the timestamp advances by 1 millisecond.

Why does the on-screen preview show only 500 UUIDs?

Rendering 10,000 individual DOM rows with hover copy buttons slows down mobile browsers. Capping the visible list at 500 keeps scrolling smooth while Copy all and Download always include every generated UUID.

Which UUID versions contain a readable creation timestamp?

Versions 1, 6, and 7 embed creation timestamps. Version 7 stores a 48-bit Unix millisecond count, while versions 1 and 6 store 60-bit 100-nanosecond intervals since October 15, 1582.

Are UUIDs safe to use as API keys or authentication secrets?

UUID v7 is never safe as a secret because its leading 48 bits expose the predictable creation millisecond. Even v4 only carries 122 random bits, so dedicated cryptographic tokens or passwords remain far stronger for authentication.

Updated