UUID Generator

Generate random version 4 UUIDs or time-ordered version 7 UUIDs, one or up to 1,000 at a time, and check what any UUID contains.

Made with your browser's cryptographic random number generator; nothing is stored or sent.

Version 4 (random)
0 UUIDs

This UUID generator creates random version 4 UUIDs or time-ordered version 7 UUIDs in your browser, one at a time or up to 1,000 in a batch for test data and seed files. Format them the way your system expects (lowercase or uppercase, with or without hyphens, with braces for Windows-style GUIDs), then copy or download them. Paste any existing UUID into the checker to find out its version and, where it has one, when it was made.

Reading a UUID

Two characters in every standard UUID say how it was made:

019a1f5e-3c7b-7d21-9f4a-1b2c3d4e5f60
              ^    ^
              |    variant: 8, 9, a or b
              version: 7

The first digit of the third group is the version, and the first digit of the fourth group is the variant, which is 8, 9, a or b for all UUIDs made under the standard. A UUID that shows 4 and a in those places is a random v4; one with 7 starts with a timestamp: its first 12 hex digits are the milliseconds since 1970.

UUID Versions

VersionMade fromUse today
1Time and the computer's MAC addressLegacy; reveals the machine. v7 replaces it
3 / 5A hash (MD5 / SHA-1) of a namespace and a nameThe same name always gives the same UUID
4Random numbersThe general-purpose default
6Version 1's fields reordered to sort by timeMainly for systems already using v1
7Unix time in milliseconds, then random numbersDatabase keys and anything that should sort by age
8A custom layoutVendor-specific formats

Formatting Options

The standard form is lowercase with hyphens, and most libraries accept uppercase too. Removing the hyphens gives a 32-character string that fits fixed-width columns. Braces match the way C#, the Windows registry and COM write GUIDs. In a database, store UUIDs in a native uuid column (PostgreSQL) or as 16 bytes (BINARY(16) in MySQL) rather than as 36-character text: the binary form is less than half the size.

Related Tools

To turn the timestamp inside a v7 UUID, or any other epoch time, into a date in your time zone, use the Unix timestamp converter. For checksums and hashes, see the hash generator.

Frequently Asked Questions

What is a UUID?

A universally unique identifier: a 128-bit value written as 32 hexadecimal digits in groups of 8-4-4-4-12, such as 3f2b8c1e-9d4a-4c6f-8e2b-7a1d5c9e0f34. It lets any computer create IDs on its own, with no central counter, and practically never produce the same one twice. The current standard is RFC 9562, published in 2024, which replaced RFC 4122.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same thing. Windows tools often show GUIDs in uppercase and wrapped in braces, {3F2B8C1E-…}; use the Uppercase and Braces options to match.

Should I use UUID v4 or v7?

Version 4 is entirely random apart from 6 fixed bits, so it reveals nothing about when or where it was made. Version 7 starts with the creation time in milliseconds, so new IDs sort after old ones. As a database primary key, v7 keeps inserts at the end of the index instead of scattered through it, which is usually faster. Use v4 when the creation time should not be visible.

Can two UUIDs ever be the same?

In theory, but not in practice. A v4 UUID has 122 random bits; you would need to generate about 2.7 quintillion (2.7 × 10^18) of them for a 50% chance of a single duplicate. A v7 UUID made here has 62 random bits plus a counter that keeps IDs made in the same millisecond in order, which is plenty for any one application.

Are these UUIDs secure enough to use?

They come from crypto.getRandomValues, the browser's cryptographically secure random number generator, the same source used by crypto.randomUUID(). That makes them fine as IDs. Do not use a UUID as a password or secret token, though: it is designed to be unique, not secret.

How do I generate a UUID in code?

JavaScript: crypto.randomUUID(). Python: uuid.uuid4(), or uuid.uuid7() from Python 3.14. Java: UUID.randomUUID(). PostgreSQL: gen_random_uuid(), and uuidv7() from version 18. All of these give version 4 unless the name says 7.

What does the checker tell me?

It accepts a UUID with or without hyphens, braces or a urn:uuid: prefix, and shows the standard lowercase form, the version, the variant and, for versions 1, 6 and 7, the date and time the UUID was created.