Lorem.space

UUID generator

Generate a random UUID, or up to 500, in your browser. Version 4 is fully random, and version 7 starts with the current time, so new IDs sort after old ones. You can also paste a UUID below to see its version.

What a UUID is

A UUID (universally unique identifier) is a 128-bit number used as an ID, written as 32 hexadecimal digits in five groups, such as f47ac10b-58cc-4372-a567-0e02b2c3d479. Microsoft calls the same thing a GUID. Programs can create UUIDs on their own, with no central list, and still expect never to create the same one twice. UUIDs are defined in RFC 9562, which replaced RFC 4122 in 2024.

The first digit of the third group is the version. In f47ac10b-58cc-4372-… it is 4.

UUID v4 or v7?

Version 4Version 7
Made from122 random bitsA 48-bit Unix time in milliseconds, then 74 random bits
Sort orderRandomBy creation time
Shows when it was madeNoYes, to the millisecond
Good forTokens, file names and IDs that should reveal nothingDatabase primary keys, logs and event IDs

Version 4 is the one most code means by a random UUID, and Python names its function uuid4, so a UUID4 generator makes version 4. Version 7 suits database keys because new rows go at the end of the index instead of at random places in it. Use version 4 when the ID should not show when it was made.

How this generator makes them

Both versions take their random bits from crypto.getRandomValues, the browser's cryptographically secure random number generator. Version 7 adds the current time from your device's clock. When you make many version 7 UUIDs at once, each one after the first adds a small random step to the one before, as RFC 9562 allows, so the list stays in order even inside one millisecond. The UUIDs are made on your device and never sent anywhere.

A UUID is an ID, not a password. Version 4 is hard to guess, but don't use a UUID on its own to protect private data.

Frequently asked questions

Can two UUIDs be the same?

In practice, no. A version 4 UUID has 122 random bits, so the chance of two matching is too small to plan for.

What is the difference between a UUID and a GUID?

None that matters. GUID is Microsoft's name for a UUID, and GUIDs are often written in uppercase inside braces, which the options above can do.

Should I use UUID v4 or v7?

Use version 7 for database primary keys, because it sorts by creation time. Use version 4 when the ID should not reveal when it was made.

How do I tell which version a UUID is?

Look at the first digit of the third group, or paste the UUID into "Check a UUID" above. For a version 7 UUID, the checker also shows when it was created.

Is this UUID generator safe to use?

Yes. The UUIDs are made in your browser from its secure random number generator and are never sent to a server.