UUID Generator
Generate universally unique identifiers (UUIDs / GUIDs) in v1, v4 or v7 format. Everything runs in your browser — nothing is sent to any server.
Format
What is a UUID?
A UUID (Universally Unique Identifier), also known as a GUID (Globally Unique Identifier), is a 128-bit label used to uniquely identify information in computer systems. The probability of generating duplicate UUIDs is so astronomically low that they can be assumed to be unique across all systems without requiring a central coordinator.
UUID Versions Explained
v4 — Random
Cryptographically random. Best for most use cases.
v1 — Time-based
Based on current time + MAC address (simulated).
v7 — Unix Time
Sortable by creation time. Ideal for database primary keys.
Common Use Cases
- Database primary keys — especially UUID v7 for sortability
- Session tokens and authentication
- Idempotency keys in distributed systems
- Tracking IDs for analytics events
- File naming to avoid conflicts
How to generate UUIDs
- Pick a version. If you're unsure, keep v4; choose v7 for database keys.
- Set how many you need, from 1 up to 1,000.
- Toggle uppercase or remove the hyphens if the system you're pasting into expects that.
- Click Generate, then copy the list or download it as a text file, one UUID per line.
Reading a UUID
A UUID is written as 32 hexadecimal digits in five groups: 8-4-4-4-12. Two of those digits tell you what kind of UUID you're looking at. The first digit of the third group is the version, and the first digit of the fourth group is the variant, which is always 8, 9, a or b for standard UUIDs:
0192d4e8-7b3a-7c41-9f2e-5a8b1c3d4e6f
^ ^
version 7 variant (8–b)That's handy when debugging: if an ID in your logs has a 4 there, it's random; a 7 means it begins with a timestamp you can decode.
v1, v4 or v7?
Version 4is the default almost everywhere, and for good reason. It's 122 random bits with no structure, so it reveals nothing about when or where it was made. Use it for anything public: resource IDs in URLs, idempotency keys, correlation IDs.
Version 7 (standardised in RFC 9562 in 2024) puts a millisecond Unix timestamp in the first 48 bits, followed by random data. IDs created later sort after IDs created earlier. That one property makes a big difference for database primary keys: new rows land at the end of the index instead of at random positions, which keeps B-tree indexes compact and inserts fast. The trade-off is that anyone holding the ID can tell when it was created.
Version 1is the original time-based format. It embeds a timestamp and, traditionally, the machine's MAC address. Browsers can't read your MAC address, so this tool uses a random node ID as the specification allows. Today, v1 is mostly needed for compatibility with older systems; for new designs, v7 does the same job better.
We go into the database side in detail in UUID v4 vs v7: which one should your database use?
Generating UUIDs in code
When you need them inside an application rather than as a one-off, every major platform has a built-in:
| Platform | Random (v4) |
|---|---|
| JavaScript (browser & Node 19+) | crypto.randomUUID() |
| Python | uuid.uuid4() |
| PostgreSQL 13+ | gen_random_uuid() |
| Java | UUID.randomUUID() |
| C# / .NET | Guid.NewGuid() |
| Command line (macOS, Linux) | uuidgen |
Support for v7 is newer: Python 3.14 added uuid.uuid7(), PostgreSQL 18 ships uuidv7(), and .NET 9 has Guid.CreateVersion7(). On older versions, a small library does the job.
Privacy
Every UUID on this page is created by your browser using crypto.randomUUID() and crypto.getRandomValues(), the same cryptographically secure source browsers use for TLS. Nothing is sent to a server or logged, so the IDs you generate here are known only to you.
Frequently asked questions
Can two UUIDs ever be the same?+
In theory yes, in practice no. A version 4 UUID has 122 random bits. You would need to generate about 2.7 quintillion of them before the chance of a single duplicate reached 50%. Bugs, like a badly seeded random generator, are a far bigger risk than chance.
What's the difference between a UUID and a GUID?+
Nothing meaningful. GUID is Microsoft's name for the same 128-bit identifier. The only practical difference is presentation: Windows tools often print GUIDs in uppercase and wrapped in braces, like {3F2504E0-4F89-11D3-9A0C-0305E82C3301}.
Is UUID v4 secure enough for API keys or session tokens?+
The UUIDs generated here come from the browser's cryptographically secure random generator, so they're unpredictable. But 122 bits is the ceiling, the format is easy to recognise in logs, and many libraries in other languages don't guarantee a secure source. For secrets, prefer a dedicated token of 256 random bits.
Should I store UUIDs as strings in my database?+
Use a native UUID type when your database has one (PostgreSQL's uuid, SQL Server's uniqueidentifier). Otherwise store 16 raw bytes, such as BINARY(16) in MySQL. A 36-character string takes more than twice the space and makes indexes slower.
Does this generator support UUID v5?+
Not at the moment. Version 5 derives a UUID from a namespace and a name using SHA-1, so the same input always yields the same ID. It's useful for deduplication, but most applications need one of the three versions offered here.
Further reading
Last updated October 16, 2026