Newtkit / Developer & AI

UUID Generator

Random v4 and time-ordered v7 UUIDs, one or a thousand, copied in one click. Randomness comes from the Web Crypto API.

Accepts hyphens or none, {braces}, urn:uuid: prefix, quotes. The example is the UUIDv7 test vector from RFC 9562.

What is a UUID and how do I generate one?

A UUID (universally unique identifier) is a 128-bit value written as 32 hex digits in five groups, like 5b30857f-0bfa-48b5-ac0b-5c64e28078d1. Anyone can create one at any time, on any machine, with no coordination, and the chance of two matching is negligible. Press Generate above: you get a v4 straight away, and a switch to v7, Nil or Max is one click.

The standard is RFC 9562, published in May 2024. It replaced RFC 4122 and added versions 6, 7 and 8 (we checked the RFC text in December 2026).

How to use this UUID generator

  1. Pick a version. v4 is fully random. v7 puts the current time first so IDs sort in creation order.
  2. Type how many you need, from 1 to 1000, and press Generate.
  3. Set the format: uppercase, no hyphens, braces, quotes and a trailing comma. The list changes at once, without making new IDs.
  4. Press Copy all, or Download .txt for a file with one UUID per line.
For SQL or JSON: turn on 'Single' or "Double" plus Comma, then paste the list straight into an IN (...) clause or an array. The last line has no trailing comma.

What is the difference between UUID v4, v7 and GUID?

A GUID is not a different thing. It is Microsoft's name for a UUID, and RFC 9562 itself says "also known as GUIDs". The versions differ in what the bits mean.

TypeLayoutSortablePrivacyGood for
v4122 random bitsNoRandom, nothing to leakPublic IDs, tokens-like IDs, small tables
v748-bit Unix ms time + 74 random bitsYes, by creation timeReveals when it was madeDatabase primary keys, event and log IDs
GUIDSame 128 bits, Microsoft nameDepends on versionSame as the version used.NET, SQL Server, Windows APIs
NilAll 128 bits zeron/an/aA placeholder meaning "no UUID"
MaxAll 128 bits onen/an/aA sentinel upper bound

Version 4 sets 6 fixed bits (the version 0100 and the variant 10) and fills the other 122 with random data. Version 7 sets the same 6 bits, stores the Unix time in milliseconds in the first 48 bits (big-endian), and fills the remaining 74 bits with random data.

How likely is a UUID collision?

The birthday approximation says that with n random IDs drawn from N possible values, the chance of any repeat is about n2 / (2N). For v4, N = 2122 ≈ 5.3 × 1036.

These figures assume a good random source. That is why the generator uses the browser's cryptographic one.

Should I use UUID v4 or v7 for a database?

Use v7 for primary keys on large tables. RFC 9562 notes that random UUIDs such as v4 have poor index locality: new rows land at random places in a B-tree, which it says can hurt performance dramatically, and it reports that time-ordered keys can be an order of magnitude or more faster. v7 keeps new keys near each other, so inserts append and the hot part of the index stays small.

Use v4 when the ID is exposed to users and the creation time must stay private, or on small tables where insert order does not matter. PostgreSQL 18 and later ship both uuidv4() and uuidv7() (version 17 has neither; checked December 2026). PostgreSQL stores them in a native 16-byte uuid type. Store UUIDs in binary or a native type, not as 36-character strings.

Is the randomness secure?

Every random bit comes from crypto.getRandomValues, the Web Crypto API your browser uses for cryptographic keys. This page never calls Math.random, which is predictable and unsuitable for identifiers. Nothing is sent to a server, so the UUIDs exist only on your device until you copy them.

Even so, a UUID is an identifier, not a secret. RFC 9562 says UUIDs must not be used as security capabilities, so do not use one as a password, API key or reset token.

How do I check whether a UUID is valid and what version it is?

Paste it into the decoder. A valid UUID is 32 hex digits, either in the 8-4-4-4-12 hyphen pattern or as 32 digits with no hyphens. The tool then reads two fields:

For v7 (and v1) the decoder also turns the embedded timestamp into a date in UTC and in your own time zone. A UUID that is well formed but has a version digit outside 1 to 8 is reported as having an undefined version, because RFC 9562 does not assign it.

Edge cases and limits

Frequently asked questions

What is a UUID generator?

A UUID generator creates 128-bit identifiers that are unique in practice without any central registry. This one makes version 4 (random) and version 7 (time-ordered) UUIDs as defined in RFC 9562, entirely in your browser.

Are UUIDs really unique?

Not by guarantee, but by probability so low it can be ignored. A v4 UUID has 122 random bits, so you would need about 2.7 quintillion of them for a 50% chance that any two match. Generating a billion per second, that takes roughly 86 years.

What is the difference between UUID v4 and v7?

v4 is 122 bits of randomness, so values arrive in no order. v7 starts with a 48-bit Unix millisecond timestamp followed by 74 random bits, so newer IDs sort after older ones. Use v7 for database primary keys, v4 when the ID must reveal nothing.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit value, usually written in uppercase and often in braces. Turn on UPPERCASE and {Braces} above to get the .NET and Windows style.

Can I use a UUID as a password or secret token?

No. RFC 9562 says UUIDs must not be used as security capabilities, meaning identifiers whose mere possession grants access. A v4 is unpredictable, but a v7 exposes its creation time, and neither is designed as a secret. Use a dedicated random token for that.

Is this UUID generator secure?

The random bits come from the Web Crypto API (crypto.getRandomValues), the browser's cryptographically secure generator. The page never uses Math.random, and nothing you generate or paste is sent anywhere.

How do I find out if a UUID is v4 or v7?

Look at the first digit of the third group. In 0190a2b3-c4d5-7e6f-8a9b-0c1d2e3f4a5b it is 7, so the version is 7. Paste any UUID into the decoder above and it reads this for you, plus the embedded date for v7.

Is it safe to generate UUIDs in bulk in the browser?

Yes. 1000 UUIDs take a few milliseconds. For more, press Generate again and append the results, or generate them in your own code with the same method.

More free tools