Tools / UUID Generator

UUID Generator

Generate v4 and v7 UUIDs in bulk — runs entirely in your browser, nothing is sent anywhere.

Version
Format

About

A UUID (Universally Unique Identifier) is a 128-bit value used to identify something — a database row, a request, a file — without a central authority handing out numbers. The chance of two independently generated UUIDs colliding is astronomically small, so systems can mint IDs anywhere — a browser tab, a serverless function, an offline device — and trust they won't clash.

UUIDv4is the version most people mean when they say "UUID": 122 bits of randomness arranged into the standard 8-4-4-4-12 hex format, with fixed version and variant bits. It's fully unpredictable, which is the point — you can't guess the next one from the last one. That matters for things like session tokens or public-facing IDs, where sequential guessing would be a real problem.

UUIDv7, standardized in RFC 9562, trades some of that unpredictability for structure: the first 48 bits are a millisecond-precision Unix timestamp, followed by 74 bits of randomness. Because the timestamp sits first, UUIDs generated later always sort after ones generated earlier — plain string or byte comparison puts them in time order. That matters more than it sounds: database indexes (B-trees especially) store data in key order, and inserting monotonically increasing keys keeps writes clustered at the end of the index instead of scattered across it. Swap a v4 primary key for v7 and you often see measurable gains in insert throughput and cache locality, with almost none of the downside — the timestamp only reveals roughly when a row was created, not what it contains.

Every UUID on this page — v4 or v7 — is generated with crypto.getRandomValues(), the browser's cryptographically secure random number generator. Generation happens entirely on your device; nothing you produce here is transmitted, logged, or stored anywhere, including by us.

FAQ

Are these UUIDs safe to use in production?
Yes. Every UUID here is generated locally with crypto.getRandomValues(), the browser's cryptographically secure random number generator — the same primitive crypto.randomUUID() uses internally. Nothing you generate is logged, stored, or sent to a server; this page has no backend to send it to.
v4 or v7 — which should I use?
Use v7 for database primary keys and anything inserted in high volume — the embedded timestamp keeps rows roughly sorted, which is friendlier to B-tree indexes than v4's fully random ordering. Use v4 when you specifically need unpredictability (session identifiers, public resource IDs that shouldn't be guessable in sequence) or when a library or API you depend on expects the classic random format.
Can two generated UUIDs collide?
Practically, no. A v4 UUID has 122 random bits, so — by the birthday-problem math — you'd need to generate on the order of 2.71 quintillion (2.71×10¹⁸) of them before the odds of a single collision reach 50%. v7 has 74 random bits per millisecond, which is still enormous for values generated in the same millisecond, and effectively irrelevant across different milliseconds since the timestamp prefix itself differs. For any realistic workload, collision isn't something you need to plan for.

Related