UUID Generator & Validator

Create cryptographically random v4 or sortable v7 UUIDs, one or a thousand at a time, and inspect any UUID or GUID to see its version and embedded timestamp.

Runs in your browserNo sign-upNothing uploaded

Generated UUIDs

How to use the UUID Generator

  1. Pick v4 for a fully random ID or v7 for IDs that sort by creation time.
  2. Set how many you need (up to 1,000) and click Generate.
  3. Optionally switch to uppercase, remove hyphens or wrap in braces for Microsoft-style GUIDs.
  4. Click the large UUID to copy it, or use Copy all / Download .txt for a batch.
  5. Paste any UUID into the inspector to validate it and read its version, variant and timestamp.

What is a UUID?

A UUID (Universally Unique Identifier), called a GUID on Microsoft platforms, is a 128-bit value written as 32 hex digits in five groups: 8-4-4-4-12. The format is defined in RFC 9562, which replaced RFC 4122 in 2024. One digit encodes the version (the 13th hex digit) and the top bits of the 17th digit encode the variant.

UUID v4 vs. UUID v7

v4v7
Content122 random bits48-bit Unix millisecond timestamp + 74 random bits
Sort orderRandomChronological
Database indexRandom inserts fragment B-tree indexesAppends at the end, much friendlier to indexes
Reveals creation timeNoYes

Use v7 for database primary keys and event IDs where insertion order matters. Use v4 when the ID must not leak when something was created. This generator keeps v7 IDs strictly increasing even when many are created in the same millisecond.

How unique are they?

With 122 random bits, you would need to generate about 2.7 quintillion v4 UUIDs before reaching a 50% chance of a single collision. This page uses the browser's cryptographically secure random generator (crypto.getRandomValues), never Math.random().

Generating UUIDs in code

// JavaScript (browsers, Node 19+)
crypto.randomUUID()
# Python
import uuid; uuid.uuid4()
-- PostgreSQL 13+
SELECT gen_random_uuid();

Frequently asked questions

Are these UUIDs safe to use in production?
Yes. They are generated locally with the Web Crypto API’s secure random generator and follow RFC 9562. Nothing is sent to or logged by a server.
What is the difference between a UUID and a GUID?
They are the same thing. GUID is Microsoft’s name and is often written in uppercase with braces, such as {3F2504E0-4F89-11D3-9A0C-0305E82C3301}. Use the options above to produce that format.
Can I get the creation time from a UUID?
Only for time-based versions. v7 stores Unix milliseconds in its first 48 bits, and v1 and v6 store a 100-nanosecond timestamp. Paste one into the inspector to see the date. v4 contains no time information.
Should I use UUIDs as database primary keys?
They work well for distributed systems and public IDs. Prefer v7 over v4 so new rows land at the end of the index, and store them in a native uuid or 16-byte binary column rather than as a 36-character string.
What is the nil UUID?
The all-zero value 00000000-0000-0000-0000-000000000000, used as a placeholder meaning “no UUID”. RFC 9562 also defines the all-f max UUID.

Related tools