Free online tools
English EN, Choose a language

UUID generator

Generate random UUIDs (version 4) or time-ordered UUIDs (version 7) in your browser. Copy one or up to 100 at once.

Version

Your UUIDs

Your UUIDs appear here.

UUIDs are made in your browser and never sent or stored.

How to generate a UUID

  1. The page makes a UUID as soon as it opens, and a new one whenever you change an option or press Generate new.
  2. Pick v4 for a purely random identifier, or v7 when the identifiers should sort by creation time (good for database keys).
  3. Set How many (1 to 100), then choose the format: hyphens, upper case, braces.
  4. Press Copy next to one UUID, or Copy all for one per line.

Three version 4 UUIDs drawn once when this page was written (a seeded example; the page itself always uses your browser's secure generator):

140f0223-3d66-4b98-9184-1f1c638639ec
af300a29-c1bd-4809-bcc9-d8a4c9c01f1f
d19c84ff-8ec7-4804-a57d-81242503d14a

What is a UUID?

A UUID (universally unique identifier, also called a GUID in the Microsoft world) is a 128-bit number written as 32 hexadecimal digits in five groups, 8-4-4-4-12. It lets separate systems create identifiers without asking a central server, with a collision chance so small it is ignored in practice. The format is defined in RFC 9562 (2024), which replaced RFC 4122.

Two characters tell you what you have: the first digit of the third group is the version (4 or 7 here) and the first digit of the fourth group is the variant (8, 9, a or b for the standard layout). Every UUID this page makes follows that rule.

Version 4 versus version 7

v4v7
Made from122 random bits48-bit Unix time in milliseconds, then 74 random bits
Sorts by creation timeNoYes, to the millisecond
Reveals creation timeNoYes, anyone can read it from the first 12 digits
Best forTokens, correlation IDs, anything that must not leak timeDatabase primary keys and logs, where ordered inserts keep indexes compact

Random v4 keys scatter across a B-tree index, which makes inserts into big tables slower and fragments pages. v7 keys arrive in roughly increasing order, so they behave like an auto-increment id while staying globally unique. Pick v4 when the time of creation is a secret, v7 when index locality matters.

How unlikely is a collision?

A v4 UUID has 122 random bits, about 5.3 × 1036 possible values. You would have to generate a billion UUIDs every second for about 85 years to reach a 50% chance of a single duplicate. For a table of a billion rows the chance of any duplicate is around 10-19. In other words, the collision risk is far below the risk of a disk error or a bug.

That only holds when the random bits are really random. This page draws each byte with crypto.getRandomValues and unbiased sampling; a weak generator such as Math.random in old libraries is a known source of collisions in the wild.

Using UUIDs in code

A UUID is an identifier, not a secret: do not use one as a password or a session token without more random data. For passwords use the password generator; for a fingerprint of a file or text use the hash generator.

Related tools

UUID generator FAQ

Is this UUID generator random and safe?

Yes. Each UUID is built from your browser's cryptographic random generator and is never sent anywhere or stored. Nothing about it reaches a server.

What is the difference between a UUID and a GUID?

They are the same 128-bit identifier. GUID is the name used in Microsoft products, usually written in upper case with braces. Use the Upper case and Braces options for that look.

Can two UUIDs ever be the same?

In theory yes, in practice no. A version 4 UUID has 122 random bits, so you would need to generate about a billion per second for roughly 85 years to have a 50% chance of one duplicate.

Which should I use, v4 or v7?

Use v4 when the identifier must not reveal when it was created. Use v7 for database keys and logs, because it sorts by creation time and keeps indexes compact.

Why does a v7 UUID start with the same digits?

The first 12 hex digits of a v7 UUID are the Unix time in milliseconds, so UUIDs made at the same moment share them. The rest is random.

Can I generate many UUIDs at once?

Yes, up to 100 at a time. Press Copy all to get them one per line, ready to paste into a spreadsheet or script.

Is a UUID a good password or secret token?

No. A UUID is meant to be unique, not secret. A v4 UUID has 122 random bits, but its format is well known and libraries sometimes use weaker generators. Use a password generator for secrets.

Missing something in the UUID generator?Suggest an idea. It takes 20 seconds and we read every one.Suggest an idea

Sends only what you type here, never the text you work with. Your email is used only to reply about this idea.

Free online tools