Enter the required information
Use the fields in the tool above and keep units and formats consistent.
Create random version 4 UUIDs ready for code, SQL and API testing. See how the format works and when UUID v7 makes a better database primary key.
A UUID (Universally Unique Identifier) is a 128-bit value written as 36 characters, like 3f2b8c1e-9a4d-4e7b-b6a1-0c5d2e8f7a93. Any system can create one independently, and the chance of two matching is close to zero. That makes UUIDs handy for distributed apps, offline-first mobile apps and test data.
This UUID generator creates random version 4 identifiers you can copy straight into code, SQL scripts or API requests.
Common uses include primary keys, names for uploaded files, idempotency keys for payment APIs and correlation IDs. A correlation ID lets you trace one request as it passes through several microservices.
Every UUID contains 32 hexadecimal digits split by four hyphens into groups of 8, 4, 4, 4 and 12. Two positions carry meaning.
4.8, 9, a or b.So in 3f2b8c1e-9a4d-4e7b-b6a1-0c5d2e8f7a93, the 4 starting "4e7b" marks version 4. The b starting "b6a1" marks the standard variant. The remaining 122 bits are random.
One special value is the nil UUID, which is all zeros: 00000000-0000-0000-0000-000000000000. Some systems use it as a placeholder meaning "no ID yet". Never store it as a real key.
| Version | Built from | Sortable by time? | Good for |
|---|---|---|---|
| v1 | Timestamp plus node (often MAC address) | Partly | Legacy systems; can leak host details |
| v4 | 122 random bits | No | General IDs, tokens, test data |
| v5 | SHA-1 hash of a namespace and name | No | Repeatable IDs from the same input |
| v7 | Unix milliseconds plus random bits | Yes | Database primary keys |
Random v4 keys scatter inserts across a B-tree index, which can slow large tables. UUID v7, standardised in RFC 9562 in 2024, starts with a timestamp. New rows land near each other, and indexes stay healthier.
A v4 UUID has 2^122 possible values, about 5.3 x 10^36. You would need to generate around 2.7 quintillion UUIDs to reach a 50% chance of one collision. In practice, a duplicate points to a bug, such as a poorly seeded random generator, not bad luck.
A good UUID generator should use a cryptographically secure random source, such as crypto.randomUUID() in modern browsers. Still, UUIDs are identifiers, not secrets. Do not use one as a password reset token unless your security review approves it. For quick IDs during development, the ToolsMate UUID generator saves writing a script.
crypto.randomUUID() returns a v4 string.uuid.uuid4() from the standard library.gen_random_uuid(), built in from version 13.UUID(), which returns a version 1 value.Use the fields in the tool above and keep units and formats consistent.
Review the result shown in the output area.
Confirm that the result matches your situation before using it for a decision.
A browser cryptographic UUID is generated with crypto.randomUUID().This describes the core logic used by the tool. Check any assumptions that may affect your result.
Use accurate inputs and keep units consistent.
Review the assumptions before using the result for a decision.
Compare important results with an independent or official source.
They are the same 128-bit identifier format under two names. GUID is the term Microsoft uses in Windows and .NET, while UUID is the name in the RFC standard. Both follow the same 8-4-4-4-12 hexadecimal layout.
In theory yes, but with version 4 the odds are tiny. You would need billions of IDs every second for decades to expect one collision. Real duplicates usually come from faulty random number generators or copied seed values.
It works, but random values spread inserts across the index and can hurt write speed on large tables. Many teams now prefer UUID v7 or ULIDs, which begin with a timestamp and keep new rows grouped together.
Modern browsers and Node.js 19 and later provide crypto.randomUUID(), which returns a version 4 UUID string. Older environments often use the uuid package from npm, which supports versions 1, 4, 5 and 7.
The standard says UUIDs should be output in lowercase but accepted in either case when read. So 3F2B and 3f2b represent the same value. Store them consistently, since some databases compare text strings with case sensitivity.
The usual text form is 36 characters: 32 hexadecimal digits plus four hyphens. Without hyphens it is 32 characters. Stored as binary in a database column, it takes only 16 bytes, which saves space and speeds comparisons.
Not on its own. A v4 UUID carries 122 random bits, but some libraries do not use secure randomness. UUIDs also often appear in logs and URLs. Generate API keys with a dedicated secure token function instead.
Explore other useful tools across the site.