UUID Generator β RFC 4122 v4 / GUID
Generate cryptographically random UUID version 4 (also known as GUID) values. Choose how many, choose formatting (hyphens, uppercase, braces). Runs in your browser.
What is a UUID?
A UUID (Universally Unique Identifier) β also called GUID (Globally Unique Identifier) in Microsoft ecosystems β is a 128-bit value designed to be unique across every system in the world without coordination. They look like 550e8400-e29b-41d4-a716-446655440000 β 32 hex characters in 5 groups separated by hyphens. UUIDs are the standard way to identify rows in distributed databases, generate filenames, build stable URLs and assign request IDs.
The standard is defined in RFC 4122. There are 5 versions, distinguished by the 13th hex character. This tool generates version 4 β the random one β which is the most commonly used variant for new applications.
UUID v4 vs. other versions
- v1 β based on MAC address + timestamp. Predictable, leaks information about the host. Mostly obsolete.
- v3 β namespace + name, hashed with MD5. Deterministic.
- v4 β fully random. The default for almost all new code.
- v5 β like v3 but uses SHA-1.
- v7 β time-ordered random (2022 standard). Database-friendly because IDs sort by creation time. Worth considering for new high-scale apps, but v4 is still safer if your tooling is older.
Are UUIDs really unique?
Not literally β there's a non-zero chance of collision, but the odds are vanishingly small. Generating 1 billion UUID v4s per second for 85 years would give a 50% chance of a single collision. In practice, treat them as guaranteed-unique.
This generator uses your browser's crypto.getRandomValues() as the random source, which is cryptographically strong. Don't use a UUID generated by Math.random() β it's not random enough and has predictable patterns.
Where UUIDs are used
- Primary keys in distributed databases β no central counter required.
- API request IDs for tracing and logging.
- Idempotency keys for safe retries on POST endpoints.
- Filenames β guaranteed not to collide.
- Session tokens, CSRF tokens (though dedicated tokens with shorter lifespans are usually better).
- Customer IDs β unlike sequential IDs, UUIDs don't leak business volume.
- Event IDs in message queues.
- WebRTC session IDs, file upload IDs, document IDs in apps like Notion.
UUID formatting variants
- Hyphenated lowercase (default):
550e8400-e29b-41d4-a716-446655440000 - Uppercase:
550E8400-E29B-41D4-A716-446655440000β used by Microsoft .NET historically. - Braced:
{550e8400-e29b-41d4-a716-446655440000}β used by Microsoft GUIDs in Windows Registry. - No hyphens:
550e8400e29b41d4a716446655440000β 32 hex chars, used in some URL contexts.
Tips and best practice
- For new high-scale apps, consider UUID v7 instead of v4 β IDs sort by creation time, making database indexes more efficient.
- UUIDs as primary keys in PostgreSQL/MySQL: use the native
uuidcolumn type, notvarchar(36)β much smaller storage. - Don't expose UUIDs in URLs where shorter IDs would do β they're 36 characters each.
- Always validate UUIDs server-side. Don't trust the format.
FAQs
Are these UUIDs really random?
Yes β uses browser crypto.getRandomValues(), the cryptographically secure random source.
What's the difference between UUID and GUID?
None β different names for the same RFC 4122 specification. GUID is Microsoft's term.
How many can I generate at once?
Up to 200 per click. For more, click multiple times or use a script.
Is this v4?
Yes β fully random UUID v4. The version digit at position 13 is always "4".
Is anything uploaded?
No. UUIDs are generated in your browser.