UUID Generator
Formatting updates the visible UUID in place. It does not generate a new value.
crypto.randomUUID().Overview
Generate and inspect UUIDs, entirely in your browser
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.
Guide
How to Use
- 1 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.
- 2 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.
- 3 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.
- 4 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.
- 5 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.
- 6 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).
Reference
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 |
Pitfalls
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.
Anatomy
Annotated Examples
Real UUIDs of each version with the version nibble, variant bits, and timestamp fields highlighted.