UUID Generator
Generate universally unique identifiers (UUIDs) instantly in your browser. Supports v1, v3, v4, v5, v6, v7, NIL, and Max. Fully client-side โ nothing leaves this page.
crypto.randomUUID(). Formatting updates the visible UUID in place. It does not generate a new value.
Paste a UUID to inspect its version, variant, and embedded data.
Accepts canonical UUIDs, no-hyphen forms, and values wrapped in braces or quotes.
How to Use
- Generate a single UUID
Open the page and a v4 UUID is already generated. Click Copy to copy it to your clipboard, or press C.
- Switch versions
Click any version button (v4, v7, v1, v6, v3, v5, NIL, Max) to generate a UUID of that type. The displayed UUID updates immediately.
- Generate in bulk
Toggle Bulk Mode on. Set your count (or pick a preset like 100 or 1000), then click Generate. Each result has its own copy button.
- Change format
Use the format controls to toggle hyphens on/off, switch between lowercase and uppercase, add braces, or wrap in quotes. Changes apply instantly to all displayed UUIDs without regenerating.
- Export results
In bulk mode, click Copy All to copy every UUID, or use the Export menu to copy or download as plain text, CSV, or JSON.
- Decode an existing UUID
Switch to the Inspect / Decode tab, paste any UUID, and click Inspect. You will see the version, variant, canonical form, and embedded timestamp (for v1, v6, v7).
UUID Version Comparison
| Version | Ordered | Deterministic | Uses Time | Best For |
|---|---|---|---|---|
| v1 | โ | โ | Yes | Legacy systems requiring time + node |
| v3 | โ | Yes | โ | Deterministic IDs from name (MD5) |
| v4 | โ | โ | โ | General-purpose random identifiers |
| v5 | โ | Yes | โ | Deterministic IDs from name (SHA-1) |
| v6 | Yes | โ | Yes | Sortable IDs (reordered v1) |
| v7 | Yes | โ | Yes | Database primary keys, modern apps |
Common Mistakes
- Using v1 when MAC privacy matters
UUID v1 can embed a MAC-like node identifier. While this tool uses a random node with the multicast bit set, some v1 implementations may leak real hardware identifiers. Prefer v4 or v7 if privacy is a concern.
- Assuming v4 is sortable
UUID v4 is entirely random and has no natural order. If you need sortable IDs for database indexes, use v7 instead โ its embedded timestamp ensures chronological ordering.
- Storing UUIDs as strings when a native type exists
Most databases (PostgreSQL, MySQL 8+, SQL Server) have a native UUID column type that stores the value as 16 bytes. Storing as a 36-character string wastes space and slows comparisons. Use the native type whenever available.
- Using a UUID as a security token
While UUID v4 is cryptographically random, UUIDs are not designed to be secret. They may be logged, indexed, or cached in transit. For security tokens, use dedicated token formats with appropriate entropy and expiration.
Annotated Examples
Real UUIDs of each version with the version nibble, variant bits, and timestamp fields highlighted.
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit label used to identify information in computer systems. UUIDs are standardized by RFC 9562 and are designed to be globally unique without requiring a central registry. They are commonly formatted as 32 hexadecimal digits displayed in five groups separated by hyphens: 8-4-4-4-12.
What is the difference between UUID and GUID?
UUID and GUID (Globally Unique Identifier) are essentially the same thing. "GUID" is the term commonly used in Microsoft/.NET ecosystems, while "UUID" is the standard term used in the RFC specification and most other platforms. The format and generation algorithms are identical.
Which UUID version should I use?
For most use cases, use UUID v4 (random) for general-purpose unique identifiers, or UUID v7 (time-ordered) when you need sortable IDs, especially for database primary keys. Use v3 or v5 when you need deterministic UUIDs derived from a name and namespace. Avoid v1 if you need to hide timing information.
What is UUID v4 and how random is it?
UUID v4 uses 122 bits of cryptographically secure random data (6 bits are reserved for version and variant). When generated with crypto.randomUUID() or crypto.getRandomValues(), the probability of collision is astronomically low โ you would need to generate about 2.71 quintillion UUIDs to have a 50% chance of a single collision.
What is UUID v7 and why is it better for databases?
UUID v7 embeds a Unix timestamp (milliseconds) in the first 48 bits, making the IDs naturally sortable by creation time. This is a major advantage for database indexes, especially B-trees, because new records are always appended rather than inserted randomly. This reduces page splits, improves write throughput, and makes range queries on time efficient.
Are UUIDs unique? Is collision possible?
UUIDs are designed to be unique in practice, but collisions are theoretically possible for random versions (v4, v7). The probability is vanishingly small when using a cryptographic random source. For deterministic versions (v3, v5), the same namespace + name will always produce the same UUID, which is by design.
Is it safe to generate UUIDs in the browser?
Yes. Modern browsers provide crypto.randomUUID() and crypto.getRandomValues(), which use the operating system's cryptographic random number generator. Browser-generated UUIDs are equally secure to those generated server-side, with the added benefit that the values never leave your device.
Can I use a UUID as a primary key?
Yes, UUIDs are commonly used as primary keys in databases. UUID v7 is recommended for this purpose because its time-ordered nature is friendly to B-tree indexes. If using v4, be aware that random insertion can cause index fragmentation in large tables. Most databases have a native UUID column type that stores the value efficiently as 16 bytes.
Why do some UUIDs have braces or no hyphens?
Different systems expect different formats. The canonical form uses hyphens (8-4-4-4-12). Microsoft/.NET often wraps UUIDs in braces: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. Some databases and APIs accept the 32-character hex string without hyphens. Use the format toggles above to match your target system's convention.
How many UUIDs can I generate at once here?
You can generate up to 1,000 UUIDs in a single batch using bulk mode. All generation happens client-side in your browser, so there is no server-imposed limit. For larger batches, simply generate multiple times and export the results.
- Open the page โ a fresh v4 UUID is already shown. Click Copy or press C to copy it.
- Click another version button (v4, v7, v1, v6, v3, v5, NIL, Max) to switch and immediately get a new UUID of that type.
- Toggle Bulk Mode, pick a count (10, 100, 500, or 1000), and click Generate to produce a list with per-row copy and an export menu.
- Use the format controls to reformat the visible UUID (hyphens, case, braces, quotes) without regenerating.
- Switch to the Inspect / Decode tab to paste an existing UUID and read its version, variant, canonical form, and embedded timestamp.