UUID generator

Generate random version 4 UUIDs or time-ordered version 7 UUIDs, one at a time or up to 1,000 in a batch, then copy them or save a file.

  • 100% free
  • Runs in your browser
  • No uploads
Version

Made with your browser's secure random generator (crypto). Nothing is sent or stored.

Check a UUID

How to generate UUIDs

  1. Choose the version. v4 is fully random; v7 begins with the current time so the ids sort in creation order.
  2. Set how many. Any number from 1 to 1,000.
  3. Pick the format. Lower case with hyphens is the standard form. Uppercase, no hyphens and {braces} suit other systems.
  4. Copy or download. Copy all puts one UUID per line on the clipboard; Download saves a .txt or .csv file.

How a UUID is built

A UUID is 128 bits written as 32 hex digits in five groups: 8-4-4-4-12, for example 0190f3a2-7c4e-7b1d-9a3f-5e2c8d4b6a10. The first digit of the third group is the version (4 or 7), and the first digit of the fourth group is the variant, always 8, 9, a or b for standard UUIDs.

In a v4 UUID the other 122 bits are random. In a v7 UUID (RFC 9562, 2024) the first 48 bits are the Unix time in milliseconds, then come 74 random bits. This generator uses part of those bits as a counter within the same millisecond, so a batch of 1,000 v7 UUIDs is already in sorted order.

UUID versions compared

VersionMade fromSortableTypical use
v1Time + network card addressNo (time bits are shuffled)Older systems; leaks the machine
v3, v5Hash of a name (MD5, SHA-1)NoThe same id for the same name, every time
v4122 random bitsNoGeneral ids, public ids
v7Unix time in ms + randomYesDatabase keys, event and log ids

Tips for using UUIDs

  • Store them as 16 bytes. PostgreSQL has a native uuid type; in MySQL use BINARY(16) rather than a 36-character string.
  • Compare in one case. UUIDs are case-insensitive, but string comparisons aren't. Lower case is the standard form.
  • Need to read one? Paste it in Check a UUID to see its version and, for v1, v6 and v7, the time it was made.

Frequently asked questions

Should I use UUID v4 or v7?

Use v7 for database primary keys and anything you sort or index: it starts with the creation time, so new rows go at the end of the index instead of scattering across it. Use v4 when the id must reveal nothing, because a v7 UUID shows to the millisecond when it was made.

Can two UUIDs ever be the same?

In theory yes, in practice no. A v4 UUID has 122 random bits. You would need to generate about 2.7 quintillion (2.7 × 10^18) of them to have a 50% chance of a single duplicate. v7 has 74 random or counter bits per millisecond, which is still far more than any real system makes.

What's the difference between a UUID and a GUID?

Nothing practical. GUID is Microsoft's name for the same 128-bit format. Windows tools often show GUIDs in upper case and wrapped in braces, like {0F8FAD5B-D9CB-469F-A165-70867728950E}, which the Uppercase and Braces options produce.

Are these UUIDs secure enough for tokens?

They come from crypto.randomUUID and crypto.getRandomValues, the browser's cryptographically secure generator, so they can't be predicted. Still, a UUID is an identifier, not a secret: for session tokens or password reset links, prefer a dedicated random token of 128 bits or more.

Is anything sent to a server?

No. The UUIDs are made in your browser and are not logged or stored anywhere, so nobody else has a copy.