UUID Generator
Generate UUID v1 (time-based), v4 (random), or v7 (time-ordered random — ideal for sorted database primary keys) and GUIDs in one click. Bulk-generate up to 1,000 UUIDs at once and copy or download as text. Uses the Web Crypto API for cryptographically secure randomness. No signup, no install — results in under a second.
Settings
Format Options
128-bit identifier with 122 random bits. The most common UUID version, ideal for general-purpose unique identifiers. Uses cryptographically secure randomness.
Generated UUIDs
0 UUIDs
Saved UUIDs
0
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit number used to identify information in computer systems. Also known as GUID (Globally Unique Identifier), UUIDs follow the format xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx where M indicates the version and N indicates the variant.
UUIDs are essential for distributed systems, database primary keys, API identifiers, session tokens, and anywhere unique identification is needed without central coordination.
UUID Versions Compared
| Version | Method | Sortable | Best For |
|---|---|---|---|
v1 | Timestamp + Node ID | Partially | Legacy systems, audit trails |
v4 | Fully random (122 bits) | No | General purpose, maximum uniqueness |
v7 | Unix timestamp + random | Yes | Database PKs, time-ordered IDs |
Nil | All zeros | N/A | Placeholder, unset value |
Max | All ones (f's) | N/A | Sentinel value, max bound |
How to Use — 3 Simple Steps
Choose Version & Quantity
Select the UUID version (v1, v4, v7, Nil, Max) and how many to generate (1 to 100). UUID v4 is recommended for most use cases.
Adjust Format
Choose uppercase or lowercase, toggle hyphens, add braces or a prefix like urn:uuid:. Pick a separator for bulk output.
Generate & Copy
Click Generate UUIDs, then click any UUID to copy it. Use Copy All or Download for bulk export.
Pro Tips
Database Primary Keys
Use UUID v7 for database primary keys. Its time-ordered nature keeps B-tree indexes efficient, unlike random v4 which causes index fragmentation.
API Identifiers
UUID v4 is perfect for API resource IDs where ordering doesn't matter. Its 122 random bits make collisions virtually impossible.
Remove Hyphens for Storage
Store UUIDs without hyphens to save 4 bytes per record. Toggle "Without Hyphens" to get the compact 32-character format.
URN Format
Add the prefix urn:uuid: for the official URN namespace format defined in RFC 4122, used in XML and SOAP services.
Frequently Asked Questions
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier that is practically unique across all systems. It follows the format xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx where M indicates the version and N indicates the variant. UUIDs are used as database primary keys, session tokens, file names, and anywhere a unique identifier is needed without coordination between systems.
What is the difference between UUID v1, v4, and v7?
UUID v1 is time-based, combining a timestamp with the system MAC address (here simulated with random bytes for privacy). UUID v4 is entirely random, offering the highest uniqueness guarantee. UUID v7 is the newest version (RFC 9562), embedding a Unix millisecond timestamp followed by random bits, making it sortable by creation time — ideal for database keys.
How random is UUID v4?
UUID v4 has 122 random bits, giving approximately 5.3 × 10^36 possible values. The probability of generating a duplicate is astronomically low — you would need to generate about 2.71 quintillion UUIDs to have a 50% chance of a single collision. This tool uses crypto.getRandomValues() for cryptographic-quality randomness.
When should I use UUID v7 instead of v4?
Use UUID v7 when you need time-sortable IDs — for example, as database primary keys where insertion order matters for index performance (B-tree friendly). UUID v7 embeds a Unix timestamp in the most significant bits, so IDs sort chronologically. Use v4 when ordering does not matter and maximum randomness is desired.
Is my generated UUID stored anywhere?
No. All UUID generation happens entirely in your browser using JavaScript. No data is sent to any server. Your UUIDs exist only in the browser tab and, if you choose, in your local browser history (localStorage). Clearing your browser data removes all stored history.
Is it safe to use UUID v4 as a database primary key?
Yes, UUID v4 is widely used as a primary key and has real advantages: it can be generated client-side without a database round-trip, it reveals no information about insertion order, and it is safe to expose in URLs. The main downside is index fragmentation — because v4 UUIDs are random, rows insert in random order in a B-tree index, causing page splits and reduced performance at scale. For databases with millions of rows, use UUID v7 instead: it embeds a timestamp in the high bits, so UUIDs sort chronologically and insert at the end of the index like an auto-increment integer — without sacrificing uniqueness.
What is the difference between a UUID and a GUID?
Technically, a GUID (Globally Unique Identifier) is Microsoft's implementation of the UUID standard. The terms are interchangeable in most contexts — both refer to the same 128-bit, 32-hex-character identifier in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Microsoft's GUIDs are typically UUID v4 (random), though historically some were v1 (time-based with MAC address). The only practical difference is formatting: Microsoft tools sometimes display GUIDs in uppercase and wrapped in braces like {A1B2C3D4-...}, while most other systems use lowercase without braces.