This generator creates UUIDs in bulk — up to 1,000 at a time, or 100,000 with bulk mode switched on — in the two versions modern systems use. UUID v4 is pure randomness: 122 random bits, no pattern, no information inside. UUID v7 keeps the same 128-bit shape but spends its first 48 bits on a millisecond timestamp, so every new ID sorts after the ones created before it. Random v4 values scatter inserts across a database index; time-ordered v7 values append neatly at its end. Pick a version, set a quantity, copy the batch — all generated locally in your browser.
For v4, the generator calls the browser's built-in crypto.randomUUID(). Four of its 128 bits are the version marker and two the variant marker, leaving 122 bits of pure randomness. For v7, it reads the current Unix time in milliseconds into the first 48 bits, stamps version 7 and the standard variant, then fills the remaining 74 bits (a 12-bit and a 62-bit random field) from crypto.getRandomValues, the browser's secure random source. Because the timestamp leads, v7 values sort in creation order at millisecond precision; IDs minted inside the same millisecond share a timestamp and order randomly among themselves. Generation, formatting, and copying happen on this page — nothing is sent to a server.
02
Practical Application & Code Integration
Use-Case Context
Two real outputs show the difference. A v4 from this generator: 52b25e61-16ee-48a6-b630-0bb5eac8db7e. In its 8-4-4-4-12 groups, the third starts with 4 (the version) and the fourth with b, one of the four valid variant markers 8, 9, a, or b. Everything else is random; there is nothing to decode. A v7: 01a1aa85-f409-7282-9095-82883cdd20b4. The third group starts with 7 and the fourth with 9, but its first twelve hex digits, 01a1aa85f409, are the creation moment as a Unix millisecond timestamp, decoding to 5 November 2026, 07:04:27 UTC.
Versions 1 to 5 come from RFC 4122; version 7 arrived with RFC 9562 in 2024. Version 1 mixes a timestamp with the machine's MAC address — sortable, but it leaks hardware identity. Versions 3 and 5 hash a name within a namespace (MD5 for v3, SHA-1 for v5), so the same input always yields the same ID — the choice when an identifier must be reproducible rather than random. Version 4 remains the general-purpose default; version 7 is the one for when order matters.
In practice, database primary keys in PostgreSQL or MySQL go to v7: new rows append at the end of the index instead of fragmenting it, and creation order reads straight from the key. Idempotency keys, request and correlation IDs, file names, and anything that must stay opaque go to v4. Most stacks generate natively too — the blueprints below show JavaScript, PostgreSQL, Python, and C#, including the native uuidv7() that arrived in PostgreSQL 18.
A v4 would need roughly 2.7 quintillion values generated before the odds of one duplicate reach 50 percent; even 100 trillion values keep the odds near one in a billion. Version 7 narrows the randomness to 74 bits, but two v7 IDs collide only if minted in the same millisecond with identical random bits.
Node.js UUIDv4 Integration
const crypto = require('crypto');
function generateSecureId() {
return crypto.randomUUID();
}
console.log(`New Order ID: ${generateSecureId()}`);
PostgreSQL Native UUID
-- Requires pgcrypto extension
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR(255) UNIQUE NOT NULL
);
Python uuid Module
import uuid
# Random (v4) — the everyday default
print(uuid.uuid4())
C# Guid.NewGuid
// A GUID is the same 128-bit format; NewGuid() generates version 4
Guid id = Guid.NewGuid();
Console.WriteLine(id);
Common Questions About Bulk UUID v4 & v7 Generator
What is the practical collision risk when batch-generating UUID v4 strings?
The probability of a collision is mathematically infinitesimal. With a space of 122 random bits, you would need to generate billions of UUIDs every single second for hundreds of years to reach a fractional 1% probability of a duplication event.
Why is UUID v7 heavily preferred over v4 for primary keys in database tables?
Because UUID v7 is naturally time-ordered and sequential, new database records are always inserted at the logical end of the index tree. This prevents random write fragmentation across disk storage blocks, directly preserving query performance as table row counts scale.
What is the difference between a UUID and a GUID?
Only the name. GUID (Globally Unique Identifier) is Microsoft's term for the same 128-bit format, and a GUID from Windows or .NET follows the same layout and version rules. Values from this tool work anywhere a GUID is expected.
Should UUIDs be uppercase or stored without hyphens?
The standard text form is lowercase hex with hyphens in the 8-4-4-4-12 pattern. Uppercase spells the same value — hex digits are case-insensitive — and some systems store UUIDs as 32 hex characters without hyphens, or as 16 raw bytes — all the same ID. Pick one representation per system — sorting assumes a single format.
Can I use a UUID as an API key or password?
No. A UUID is an identifier, not a secret. A v7 value is partly predictable — it embeds its own creation time — and even v4's randomness guarantees uniqueness, not secrecy. Anyone who sees the ID knows the whole thing. For API keys and tokens, use a dedicated random secret from a password generator instead.
Looking for more professional developer utilities?