Home › Developer Tools › UUID Generator

UUID Generator

Generate random version 4 or time-ordered version 7 UUIDs, one or thousands at a time, then copy them or download a file. Paste any UUID to check its version and read the timestamp inside v7 and v1 IDs.

 

UUID decoder and validator

The version, variant and any embedded timestamp will appear here.
Advertisement

How to use the UUID Generator

  1. Pick a version. Choose v4 for fully random IDs or v7 for IDs that sort by creation time.
  2. Set how many you need (1 to 10,000) and press Generate.
  3. Adjust the format: uppercase, no hyphens, braces, or a JSON array or SQL list. The list updates instantly without changing the IDs.
  4. Copy the list or download it as a text file.
  5. Decode a UUID by pasting it in the decoder to see its version, variant and, for v7 or v1, the date and time it was created.

How a UUID is built

A UUID is 128 bits written as 32 hexadecimal digits in five groups (8-4-4-4-12). Two places are fixed in every standard UUID: the first digit of the third group is the version, and the first digit of the fourth group holds the variant (8, 9, a or b for RFC 9562 UUIDs).

VersionLayoutExample
v4 (random)122 random bits + 4 version bits + 2 variant bits3f2b8c1e-9d4a-4e7f-a1c2-5b6d7e8f9a0b
v7 (time-ordered)48-bit Unix time in ms, version, 12 bits counter/random, variant, 62 random bits0199f9c4-1000-73a1-9c4f-0e1d2c3b4a59
v1 (legacy time)60-bit count of 100 ns since 15 Oct 1582 + clock sequence + node IDc232ab00-9414-11ec-b3c8-9f6bdeced846

Reading the time inside a UUID v7

The first 12 hex digits of a v7 UUID are the creation time in milliseconds since 1 January 1970 UTC. For 0199f9c4-1000-73a1-… the timestamp is 0x0199f9c41000 = 1,760,832,000,000 ms, which is 19 October 2025 at 00:00:00 UTC. Because the time comes first, sorting v7 UUIDs as text also sorts them by creation time. When several IDs are created in the same millisecond, this generator increments the 12-bit field after the version digit, so every ID in a batch is larger than the one before it.

Which version should I use?

  • Database primary keys: v7. New keys land at the end of B-tree indexes, which keeps inserts fast and pages compact compared with random v4 keys.
  • Public or unguessable IDs: v4. It contains nothing but randomness, so it reveals nothing about when it was made.
  • Same input should always give the same ID: v5 (SHA-1 name-based), generated from a namespace and a name. It is not random, so it is not offered here.

Both formats are 36 characters with hyphens, or 32 without. Store them in a native UUID column (PostgreSQL) or BINARY(16) (MySQL) to save space compared with text.

Frequently asked questions

What is the difference between UUID v4 and UUID v7?

A version 4 UUID is 122 random bits with no meaning. A version 7 UUID starts with a 48-bit Unix timestamp in milliseconds followed by random bits, so v7 IDs sort in the order they were created. That makes v7 friendlier for database primary keys because new rows go to the end of the index.

Is a GUID the same as a UUID?

Yes. GUID (globally unique identifier) is Microsoft's name for the same 128-bit identifier. GUIDs are often written in uppercase and sometimes wrapped in curly braces, which you can switch on in the format options.

Can two generated UUIDs ever be the same?

In theory yes, in practice no. A v4 UUID has 122 random bits, so you would need to generate about 2.7 quintillion IDs before the chance of a single duplicate reaches 50 percent. v7 IDs also include the time, which makes collisions even less likely.

Are these UUIDs secure and random?

The random parts come from your browser's cryptographically secure generator (crypto.getRandomValues or crypto.randomUUID). Still, a UUID is an identifier, not a secret: v7 IDs reveal when they were created, so do not use any UUID as a password or access token.

Does a v7 UUID reveal information?

It reveals its creation time to the millisecond, which the decoder on this page can read. It contains no MAC address, IP address or other device information.

Are the UUIDs generated on a server?

No. Every ID is created in your browser and nothing is sent anywhere, so the page works offline once it has loaded.

Related tools