Skip to content

UUID Generator

Create one UUID or five hundred, in version 4 or the newer time-sortable version 7. Randomness comes from the Web Crypto API, never from Math.random, and nothing is generated on a server.

  • UUID v4 and v7 (RFC 9562)
  • Bulk generation up to 500
  • Uppercase, braces or no dashes
  • Web Crypto randomness
  • Copy all as a list

Generator

Generated locally with Web Crypto

Result

How to generate a UUID

  1. 01

    Pick a version

    Choose v4 for pure randomness or v7 when you want identifiers that sort by creation time, such as database primary keys.

  2. 02

    Choose how many

    Generate a single identifier or up to 500 at once for seeding test data or a migration.

  3. 03

    Select a format

    Standard lowercase is the RFC form. Uppercase, braces and dashless variants are there for systems that expect them, such as .NET GUIDs.

  4. 04

    Copy the result

    Copy a single value or the whole list. Values are generated fresh in your browser each time.

v4 and v7 solve different problems

UUID v4 is 122 bits of randomness. It carries no information about when or where it was created, which is exactly what you want for public identifiers, session tokens and anything an attacker should not be able to guess or enumerate.

UUID v7, standardised in RFC 9562 in 2024, puts a 48-bit Unix millisecond timestamp in the leading bits and fills the rest with randomness. The result still looks like an ordinary UUID but sorts chronologically as a string, which makes it a far better database primary key.

Why v7 is faster as a primary key

Databases store rows in B-tree indexes. Inserting a random v4 as a clustered primary key scatters writes across the whole index: pages split, the working set stops fitting in memory, and insert throughput degrades as the table grows. This is the well-documented index fragmentation problem with UUID keys.

Because v7 values increase over time, new rows land at the right edge of the index — the same access pattern as an auto-increment integer. You keep the operational advantages of UUIDs (generate on the client, merge datasets without collisions, no central sequence) without paying the write penalty.

The tradeoff is that v7 leaks the creation timestamp to anyone holding the identifier. For an internal primary key that is usually fine. For a password-reset token it is not.

Are collisions something to worry about?

In practice, no. With 122 random bits, you would need to generate roughly 2.7 × 10^18 v4 UUIDs before reaching a 50% chance of a single collision. Generating a billion per second, that is over eighty years.

The realistic risk is not mathematics but bad randomness. UUIDs built on Math.random, on a poorly seeded PRNG, or on a device with an unseeded entropy pool at boot have collided in the wild. This tool uses crypto.getRandomValues, the browser's cryptographically secure generator.

Formats you may run into

The canonical form is 36 characters, lowercase, hyphenated: 8-4-4-4-12. RFC 9562 specifies lowercase output, though parsers must accept uppercase input.

Microsoft ecosystems often render GUIDs in braces ({...}) or uppercase. The dashless 32-character form shows up in URLs and as database column values where the hyphens are stripped to save space. All three are the same 128 bits — only the presentation differs.

Frequently asked questions

Are these UUIDs generated on a server?

No. They are generated in your browser with the Web Crypto API. Nothing is requested from or sent to a server, so no one else ever sees the values you generate — including us.

Should I use UUID v4 or v7?

Use v7 for database primary keys and anything you want sorted by creation time. Use v4 for public-facing or security-sensitive identifiers, because v7 exposes the millisecond it was created.

Is a UUID the same thing as a GUID?

Yes, functionally. GUID is Microsoft naming for the same 128-bit identifier described by RFC 9562. The main practical difference is presentation: Microsoft tooling often uses uppercase and wraps values in braces.

Can two UUIDs ever be identical?

It is possible but negligible with a proper random source. Reaching a 50% chance of one collision takes on the order of 2.7 quintillion v4 UUIDs. Real-world collisions come from weak randomness, not from exhausting the space.

Is a UUID safe to use as a secret token?

A v4 UUID has 122 bits of entropy, which is strong enough for most session identifiers. A v7 UUID is not, because half of it is a predictable timestamp. For password resets and API keys, prefer a dedicated random token of at least 32 bytes.

Why does UUID v7 sort correctly as text?

Because the timestamp occupies the leading bits and is written big-endian in hexadecimal. Comparing two v7 UUIDs character by character compares their timestamps first, so lexicographic order matches chronological order.

Developers

JWT Decoder

Decode the header and payload of a JWT without the token ever leaving your browser.

Developers

.env Validator

Catch quoting, duplicate and syntax bugs in a .env file before they break your deploy.

Developers

Cron Expression Parser

Translate a cron expression into plain English and see exactly when it runs next.