How to generate UUIDs
Pick a version, choose how many identifiers you need (up to 1,000), and click Generate UUIDs. Toggle uppercase or remove hyphens to match your system's format, then copy them all with one click. Every UUID is generated locally in your browser.
UUID format
A UUID is 128 bits shown as 32 hexadecimal digits in five groups. The digit at M is the version (4 or 7), and the top bits at N are the variant (always 8, 9, a or b for standard UUIDs).
UUID v4 vs. v7
| UUID v4 | UUID v7 | |
|---|---|---|
| Contents | 122 random bits | 48-bit ms timestamp + 74 random bits |
| Sortable by creation time | No | Yes |
| Database index performance | Poor — random inserts fragment B-trees | Good — inserts append in order |
| Reveals creation time | No | Yes |
| Best for | Public identifiers, tokens, idempotency keys | Primary keys, event IDs, logs |
UUID v7 was standardised in RFC 9562 (2024) and is now supported natively by PostgreSQL 18's uuidv7(), and by libraries in most languages. Laravel's HasUuids trait generates ordered UUIDs for the same indexing benefit.
Generating UUIDs in code
- JavaScript:
crypto.randomUUID()(v4) - Python:
uuid.uuid4(), anduuid.uuid7()from Python 3.14 - PHP / Laravel:
Str::uuid()orStr::uuid7() - MySQL:
UUID()returns v1; store asBINARY(16)for efficiency - Java:
UUID.randomUUID()(v4)
Need a random secret instead of an identifier? Use the password generator. To fingerprint data, use the hash generator.
Frequently asked questions
What is a UUID?
A UUID (Universally Unique Identifier), also called a GUID, is a 128-bit identifier written as 32 hex digits in the pattern 8-4-4-4-12. It can be generated independently on any machine with a negligible chance of collision.
Should I use UUID v4 or v7?
Use v7 for database primary keys: its first 48 bits are a millisecond timestamp, so values sort by creation time and keep B-tree indexes compact. Use v4 when you need identifiers that reveal nothing about when they were created.
Can two UUIDs ever collide?
In theory yes, in practice no. A v4 UUID has 122 random bits; you would need to generate about 2.7 quintillion UUIDs for a 50% chance of a single collision.
Are these UUIDs secure?
They're generated in your browser with the Web Crypto API's cryptographically secure random number generator. Even so, don't use UUIDs as secrets like password-reset tokens — use a dedicated random token for that.
Last updated: 22 September 2026Suggest an improvement · Report a problem
