This UUID generator makes random version 4 UUIDs, 1 to 100 at a time, in lowercase or uppercase and with or without hyphens. A UUID (Universally Unique Identifier) is a standard 128-bit ID written as 32 hexadecimal digits in five groups. Apart from the 6 version and variant bits, all 122 bits come from your browser's crypto.getRandomValues().
How to use the UUID generator
- One UUID is ready when the page opens. To generate UUIDs in bulk, enter a number from 1 to 100 under Number of UUIDs.
- Tick Uppercase or Remove hyphens if the system you are feeding needs that format.
- Press Generate UUID(s). The list appears one per line, and the Info cards show how many were made, the version (v4) and the format.
- Press Copy All for the whole list or Copy First for the top one. Clear empties the list and resets the count to 1.
What a v4 UUID looks like
4aafaffa-734e-4dfe-887e-0f51543b308a
4AAFAFFA-734E-4DFE-887E-0F51543B308A
4aafaffa734e4dfe887e0f51543b308a
These are the same UUID in the default format, with Uppercase ticked and with Remove hyphens ticked. The hyphenated form is 36 characters, split 8-4-4-4-12; without hyphens it is 32. The first digit of the third group is always 4, the version. The first digit of the fourth group is 8, 9, a or b, set by the variant bits. Every other digit is random, which is what makes this a UUID v4 generator.
Random UUID generator or time-based: v1, v4 and v7
| Version | Built from | Sorts by creation time | Made here |
|---|---|---|---|
| v1 | A timestamp, a clock sequence and usually the MAC address | No | No |
| v4 | 122 random bits | No | Yes |
| v7 | Unix time in milliseconds plus random bits | Yes | No |
If you are building a database, consider UUID v7. It starts with a Unix timestamp in milliseconds (the same count the Unix timestamp converter shows on its live clock), so v7 IDs sort by creation time, and RFC 9562 notes that time-ordered UUIDs give better database-index locality than random v4 ones. I've switched all my new projects to v7 for this reason. This page only generates v4, so create v7 IDs with your language's UUID library. The UUID v4 vs v7 comparison goes through the trade-offs.
Version 1 UUIDs usually carry the MAC address of the machine that made them, which RFC 9562 flags as a privacy and security risk. A random UUID generator has no hardware field to leak.
GUIDs and UUIDs in code
GUID is Microsoft's name for the same 128-bit format, so this page works as a GUID generator too. The Windows registry writes them in uppercase inside braces, like {4AAFAFFA-734E-4DFE-887E-0F51543B308A}. To make a version 4 UUID in code:
JavaScript crypto.randomUUID()
Python uuid.uuid4()
Java UUID.randomUUID()
C# / .NET Guid.NewGuid()
PostgreSQL gen_random_uuid()
Storing and using UUIDs
- RFC 9562 says to output UUIDs in lowercase and to accept either case on input. Uppercase is fine for systems that expect it, but compare UUIDs without regard to case.
- A PostgreSQL uuid column or a BINARY(16) column stores a UUID in 16 bytes. The hyphenated text in a CHAR(36) column takes at least 36.
- Don't use a UUID as a password, session secret or reset token. RFC 9562 tells implementations not to assume UUIDs are hard to guess, so make secrets with the password generator.
- A v4 UUID says nothing about when or where it was made, unlike v1 and v7, so it gives away no creation time when it appears in a URL or an API response.
- Need more than 100? Press Generate UUID(s) again: every press of the UUID generator makes a fresh batch, and none of the earlier IDs are reused.
- For an ID that must be the same every time for the same input, use a hash from the hash generator instead. A v4 UUID is new on every click.
Other ID, hash and time tools are in the developer tools section.