UUID Generator

Generate random v4, time-ordered v7 or v1 UUIDs, up to 1,000 at once, and paste any UUID to read its version, variant and embedded timestamp.

The interactive tool loads here when JavaScript runs.

About this tool

What is the UUID Generator?

The UUID Generator creates universally unique identifiers in several versions, one at a time or up to 1,000 at once, and includes an analyzer that tells you which version and variant an existing UUID is.

Version 4 UUIDs are generated with the browser's crypto.randomUUID(), which uses a cryptographically secure random source. Versions 1 and 7 come from the widely used uuid package, and the page also offers the Nil UUID (all zeros) and the Max UUID (all f's).

The analyzer reads the version and variant digits and, for time-based UUIDs, decodes the embedded timestamp. For version 1 it also shows the node field labelled as a MAC address, though the uuid package fills that field with random bytes rather than your real hardware address.

  • Version 4 generated with crypto.randomUUID()
  • Version 1, Version 7, Nil and Max UUID options
  • Bulk generation of up to 1,000 UUIDs with Copy All and download
  • Analyzer that reports version, variant and v1 or v7 timestamps
  • Runs locally; nothing is sent to a server
Read the guide: UUID Generator Guide: Complete Overview of UUIDs and Unique Identifiers

Updated

How to use the UUID Generator

  1. Pick a UUID Version from the dropdown. Version 4 (Random) is the right default for most uses.
  2. Set Bulk Count if you need more than one, from 1 to 1,000.
  3. Generate, then copy a single UUID, Copy All, or Download the list as a text file when you generated more than one.
  4. To inspect an existing UUID, paste it into the analyzer and click Analyze to see its version, variant and, for v1 and v7, its timestamp.

Worked examples

Reading the time out of a v7 UUID

Input

01890a5d-ac96-774b-bcce-b302099a8057

Output

Version 7, variant RFC 4122/DCE 1.1, timestamp 2023-06-30T03:34:18.518Z

The first 12 hex digits (01890a5dac96) are milliseconds since 1970. That is why v7 IDs sort by creation time and why they reveal when a record was made.

Spotting the version by eye

Input

f47ac10b-58cc-4372-a567-0e02b2c3d479

Output

Version 4, variant RFC 4122/DCE 1.1

The 4 that starts the third group is the version; the a that starts the fourth group marks the standard variant.

Background and insight

UUIDs were standardized in RFC 4122 in 2005, building on identifiers used in the Apollo Network Computing System and later in DCE and Microsoft's GUIDs. In 2024 RFC 9562 replaced RFC 4122 and formally added versions 6, 7 and 8, along with the Max UUID.

Version 4 is the workhorse: 122 random bits, so the chance of two colliding is negligible for any realistic system. Its weakness is that random keys scatter across a database index, which can slow inserts on large B-tree tables. Version 7 was designed to fix that by putting a Unix millisecond timestamp in the leading 48 bits, so new IDs sort roughly in creation order while staying unique.

The version is always readable from the string itself: it is the first hex digit of the third group. In 550e8400-e29b-41d4-a716-446655440000 that digit is 4. The first digit of the fourth group gives the variant; 8, 9, a or b means the standard RFC layout.

Common use cases

  • Database primary keys

    Generate IDs for rows that are created on several services and later merged, where auto-increment numbers would clash.

  • Test fixtures and seed data

    Bulk-generate hundreds of IDs for fixtures, mock APIs or load tests.

  • Idempotency and correlation keys

    Attach a fresh UUID to a request so retries can be detected and logs across services can be joined.

  • Identifying a UUID you found

    Paste an ID from a log or database into the analyzer to see which version produced it and when.

Tips and limitations

  • v7 and v1 UUIDs leak their creation time. Use v4 for IDs that appear in public URLs if timing is sensitive.
  • Store UUIDs in a native uuid column (PostgreSQL) or BINARY(16) (MySQL) rather than a 36-character string to save space and speed up indexes.
  • UUIDs are case-insensitive. RFC 9562 recommends lower case on output, but parsers must accept both.
  • The analyzer accepts the hyphenated 8-4-4-4-12 form only. Add the hyphens back to a 32-digit hex string before analyzing it.
  • A UUID is an identifier, not a secret. Generate session and reset tokens with a dedicated random token generator.

Sources and further reading

  1. RFC 9562: Universally Unique IDentifiers (UUIDs), IETF. The current standard, including versions 6, 7 and 8 and the Max UUID
  2. RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace, IETF. The 2005 specification it replaced
  3. Crypto: randomUUID() method, MDN Web Docs. The browser's secure version 4 generator

Frequently asked questions

Which UUID version should I use for a new project?

Use version 4 when you just need a unique, unpredictable ID. Use version 7 for database primary keys where insert order and index locality matter, since its leading timestamp keeps new rows near each other in a B-tree index. Versions 1, 3 and 5 are mostly for compatibility.

Can two UUID v4 values collide?

In theory yes, in practice no. A v4 UUID has 122 random bits, so you would need to generate around 2.7 quintillion of them before the chance of a single collision reached 50%. Bugs such as a badly seeded random generator are a far more realistic risk.

Are UUIDs safe to use as secret tokens?

Not by design. A v4 UUID from a secure generator is hard to guess, but UUIDs are specified to be unique, not secret, and other versions are predictable. For session tokens or password reset links, use a token generator built for that, with at least 128 bits of randomness.

What are the Nil and Max UUIDs used for?

The Nil UUID is all zeros and the Max UUID is all f's. Both are defined in RFC 9562 and serve as sentinel values: Nil often means "no ID yet", and Max is handy as an upper bound in range queries or pagination cursors over UUID keys.

How can I tell when a v7 UUID was created?

Take the first 12 hex digits, drop the hyphen, and read them as a number of milliseconds since 1 January 1970 UTC. Paste the UUID into the analyzer and it does this for you, showing the timestamp in ISO 8601 and in your local time.

Is there an in-depth guide to the UUID Generator?

Yes. “UUID Generator Guide: Complete Overview of UUIDs and Unique Identifiers” covers the background, how it works, common pitfalls and worked examples. Read the full guide.