AI Tools Free

UUID Generator

Enter a batch count from 1 to 100 in this UUID generator to mint cryptographically random Version 4 UUIDs (xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx) in your browser. Every identifier is created locally via the Web Crypto API with zero embedded timestamps or network calls.

Free to useNo sign-upRuns in your browser
Enter your details

Update the inputs to see your result.

Your result
Enter your details

Result will appear here

How this random UUID generator creates Version 4 UUIDs

This random UUID generator calls your browser's native Web Crypto engine (crypto.randomUUID() or crypto.getRandomValues()) to produce RFC 9562 and RFC 4122 compliant Version 4 identifiers. Each 128-bit value is formatted as 32 hexadecimal digits across five hyphen-separated groups (8-4-4-4-12).

In a 16-byte Version 4 array, Byte[6] has its high nibble masked to 0100 ((bytes[6] & 0x0f) | 0x40), placing 4 at the start of group three. Byte[8] has its top two bits masked to 10 ((bytes[8] & 0x3f) | 0x80), placing 8, 9, a, or b at group four.

The remaining 122 bits come straight from your operating system's cryptographically secure pseudo-random number generator (CSPRNG). With 2^122 (about 5.32 x 10^36) possible Version 4 UUIDs, you would need to generate 2.71 quintillion identifiers to reach a 50% probability of a single duplicate under the birthday bound.

UUID Generator diagram showing 128-bit Web Crypto byte generation, RFC 9562 version 4 and variant bitmasking, and 8-4-4-4-12 hex formatting
16 random CSPRNG bytes are masked at Byte[6] (version 4) and Byte[8] (RFC 9562 variant) to form a 36-character UUIDv4 string.

UUID Generator Bit Layout & Native Language Equivalents

Compare the five hyphenated field groups in a 36-character Version 4 UUID (RFC 9562) and the built-in functions used to generate UUIDv4 across major programming environments.

Field or EnvironmentCharacter / Byte PositionBit / Output RuleExample or Native Function
Group 1 (random_a)Chars 1 to 8 (Bytes 0 to 3)32 CSPRNG random bitsf47ac10b
Group 2 (random_a)Chars 10 to 13 (Bytes 4 to 5)16 CSPRNG random bits58cc
Group 3 (ver + random_b)Chars 15 to 18 (Bytes 6 to 7)4-bit version 0100 (4) + 12 random bits4372 (always starts with 4)
Group 4 (var + random_c)Chars 20 to 23 (Bytes 8 to 9)2-bit variant 10 (8/9/a/b) + 14 random bitsa567 (starts with 8, 9, a, or b)
Group 5 (random_c)Chars 25 to 36 (Bytes 10 to 15)48 CSPRNG random bits0e02b2c3d479
Browser / Node.jsBuilt-in Web Crypto APIReturns lowercase 36-char UUIDv4 stringcrypto.randomUUID()
Python 3Standard uuid moduleUses OS CSPRNG (os.urandom(16))str(uuid.uuid4())
PostgreSQL 13+Core built-in SQL functionNative CSPRNG uuid type generatorSELECT gen_random_uuid();

How to generate UUID batches in your browser

Generate a single identifier or a batch of up to 100 Version 4 UUIDs in three steps.

Enter the UUID count (1 to 100)

Enter how many identifiers you need in the Number of UUIDs field. The tool defaults to 5 UUIDs on page load and accepts any whole number from 1 up to 100 per batch.

Number of UUIDs batch input (1 to 100)
Number of UUIDs input field set to 5 with the Generate UUIDs button ready
Step 1: Set the Number of UUIDs field to any integer between 1 and 100.

Click Generate UUIDs to run Web Crypto

Select the Generate UUIDs button to mint a fresh batch locally in your browser. The result panel updates the count header (such as 5 generated) and confirms the RFC 4122 UUID v4 format.

Browser-local Web Crypto UUIDv4 batch
Result summary displaying 5 generated Version 4 UUIDs in RFC 4122 format
Step 2: Select Generate UUIDs to mint a fresh batch via your browser's Web Crypto API.

Copy the newline-separated UUID list

Click Copy result below the generated list to copy all newline-separated UUID strings to your clipboard, ready to paste into SQL seed scripts, JSON test fixtures, or environment variables.

Newline-separated UUIDv4 list and Copy result button
Newline-separated list of 5 Version 4 UUIDs with one-click Copy result button
Step 3: Use Copy result to copy all generated UUIDv4 strings to your clipboard.

Practical UUID generator online use cases

Developers and QA engineers use random Version 4 UUIDs when identifiers must be unique across distributed nodes without leaking creation timestamps.

Opaque public resource and URL identifiers

When exposing user profiles, shared documents, or order links in public URLs, Version 4 UUIDs prevent external users from guessing sequential IDs or decoding the timestamp when a record was created.

Opaque Version 4 UUID used as a public REST API path parameter
Public URLs using UUIDv4 hide record creation timestamps and total row counts.

Distributed request and trace correlation IDs

Edge proxies, browser clients, and microservices can mint X-Request-ID or correlation headers independently without waiting on a central sequence generator or risking clock-skew collisions.

X-Request-ID correlation header populated with a random Version 4 UUID
Edge proxies and clients mint independent X-Request-ID values without central coordination.

Seed data and automated test fixtures

When writing database migrations, OpenAPI mock payloads, or unit test fixtures, generating a batch of 10 to 100 fresh UUIDv4 strings avoids copy-paste collisions across test suites.

Batch of 5 generated Version 4 UUIDs pasted into a JSON test fixture
Generate batches of up to 100 fresh UUIDv4 strings for SQL seeds and test fixtures.

How to read and verify a generated UUID v4 string

Check two fixed hexadecimal positions in any 36-character 8-4-4-4-12 UUID to confirm it conforms to RFC 9562 Version 4.

You can verify that any 36-character string is a valid Version 4 UUID by checking two fixed hexadecimal positions in its 8-4-4-4-12 layout. First, the opening character of the third group (character 15 overall, right after the second hyphen) is the version nibble and is 4 for every Version 4 UUID. Second, the opening character of the fourth group (character 20 overall, right after the third hyphen) encodes the two-bit RFC 9562 variant (0b10) and is 8, 9, a, or b.

Because all other 122 bits come from a cryptographic random generator, a Version 4 UUID contains no creation timestamp, node MAC address, or monotonic counter. If you need to inspect an unknown identifier string, check its version bits, or extract a timestamp from a Version 1 or Version 7 UUID, paste it into the UUID Decoder.

Diagram highlighting character 15 (version 4) and character 20 (variant 8, 9, a, or b) in a 36-character UUIDv4 string
Character 15 is always 4 (version) and character 20 is always 8, 9, a, or b (RFC 9562 variant).

Random UUID generator collision math and indexing limits

Keep these security and database indexing boundaries in mind when deploying Version 4 UUIDs in production.

Keep two operational boundaries in mind when deploying Version 4 UUIDs in production. First, UUIDv4 values are collision-resistant identifiers, not authentication tokens or bearer secrets: while 122 bits of CSPRNG entropy are unpredictable, resource IDs are routinely recorded in server access logs, browser history, and APM traces. For signed tokens or message verification, use the JWT Decoder or HMAC Generator.

Second, because every new Version 4 UUID lands at a random position across the full 128-bit range, using UUIDv4 as a clustered primary key in large PostgreSQL or MySQL InnoDB tables (tens of millions of rows) causes frequent B-tree page splits and buffer-pool churn. For write-heavy database tables that benefit from sequential index appends, generate time-ordered keys with the UUIDv7 Generator.

Comparison of random UUIDv4 B-tree index inserts versus sequential time-ordered UUIDv7 appends
Random 128-bit UUIDv4 keys scatter across B-tree pages, whereas time-ordered UUIDv7 keys append at the right edge.

Frequently asked questions about UUID generation

Answers to common questions about RFC 9562 Version 4 UUID entropy, collision probability, and native language functions.

How is a Version 4 UUID generated in this tool?

This tool calls your browser's Web Crypto API (crypto.randomUUID(), or crypto.getRandomValues() on a 16-byte array) to fill 122 bits with cryptographic randomness while setting the 4-bit version field in octet 6 to 0100 (hex 4) and the 2-bit variant field in octet 8 to 10 (hex 8, 9, a, or b).

Can a random UUID generator produce a duplicate UUIDv4?

In practice, no. Because 122 bits of randomness provide 2^122 (roughly 5.32 x 10^36) unique values, you would have to generate 1 billion Version 4 UUIDs per second continuously for about 86 years (2.71 x 10^18 total UUIDs) to reach a 50% chance of a single collision.

How do I generate a UUID v4 in JavaScript, Python, or PostgreSQL?

In modern browsers and Node.js (v14.17+), call crypto.randomUUID(). In Python 3, import the built-in uuid module and call str(uuid.uuid4()). In PostgreSQL 13 and newer, run SELECT gen_random_uuid(); without installing any extension.

When should I use UUIDv4 instead of UUIDv7?

Use Version 4 UUIDs for public URLs, external resource IDs, correlation headers, and test fixtures where you do not want outsiders to infer the exact millisecond a record was created. Use Version 7 UUIDs for high-volume database primary keys where chronological sorting and B-tree index locality matter.

Does a Version 4 UUID contain a timestamp or MAC address?

No. Unlike Version 1 UUIDs (which include a 60-bit timestamp and 48-bit MAC address) or Version 7 UUIDs (which start with a 48-bit Unix millisecond timestamp), a Version 4 UUID is completely random and reveals no timing or hardware metadata.

Are the UUIDs generated on this page sent to a server?

No. Every batch of 1 to 100 UUIDs is generated inside your browser tab using local Web Crypto entropy. Nothing is transmitted over the network, logged, or stored on any server.

Generate random Version 4 UUIDs now

Enter a batch count from 1 to 100 in the Number of UUIDs field above and click Generate UUIDs to copy fresh RFC 9562 identifiers.

Generate UUIDs