Free tool

Free UUID generator

This free UUID generator (also called a GUID generator) creates random UUID v4 identifiers and time-sortable UUID v7 identifiers, one at a time or in bulk — up to 1,000 at once. Copy a single ID, or format and download a whole batch for your code, database, or spreadsheet. Everything runs locally in your browser.

UUID / GUID generator

Generate cryptographically random UUIDs (v4), time-sortable UUIDs (v7), or the nil UUID — one at a time or up to 1,000 in bulk. Runs entirely in your browser.

FreeNo upload — 100% privateRFC 9562 compliant

Your V4 UUID

9f545a99-cbb2-4977-84f0-7a0e2ee62d5e

1–1000
Options

Every UUID is generated locally with the Web Crypto API (crypto.getRandomValues / crypto.randomUUID), so nothing is ever sent to a server. v4 UUIDs use 122 bits of randomness; v7 UUIDs embed a 48-bit millisecond timestamp plus 74 random bits, per RFC 9562.

What is a UUID?

A UUID (Universally Unique Identifier), also known as a GUID (Globally Unique Identifier on Windows and in .NET), is a 128-bit number used to identify information in computer systems without relying on a central authority to hand out IDs. A UUID is almost always written as 32 hexadecimal digits, split into five groups separated by hyphens, in the pattern 8-4-4-4-12, for example: f47ac10b-58cc-4372-a567-0e02b2c3d479.

The key idea behind a UUID is that it can be generated independently, on any machine, at any time, without coordinating with anyone else — and the odds of two independently generated UUIDs colliding are so small that they're treated as effectively zero in practice. That makes UUIDs the default choice for primary keys, request IDs, session tokens, file names, and distributed system identifiers where you can't rely on an auto-incrementing counter from a single database.

UUIDs are standardized by RFC 9562 (which obsoletes the older RFC 4122), published by the IETF. The standard defines several “versions” of UUID, each encoding information differently inside those 128 bits — this tool focuses on the two most useful versions for modern applications: v4 and v7, plus the special all-zero “nil” UUID.

UUID v1 vs v4 vs v7: what's the difference?

Every UUID encodes a 4-bit “version” number in the third group, so software can tell at a glance how the ID was constructed. The version matters because it determines what information (if any) leaks from the ID, and whether IDs sort in a useful order.

VersionHow it's builtBest for
v1A 60-bit timestamp (100ns ticks since 1582) plus the generating computer's MAC address and a clock sequence.Legacy systems. Rarely used today because it leaks the MAC address and creation time, which is a privacy and security concern.
v4122 bits of cryptographically secure randomness, plus a 4-bit version marker and a 2-bit variant marker.The most common choice: API keys, session IDs, primary keys, file names — anywhere you need a unique ID with zero structure or metadata leakage.
v7A 48-bit Unix millisecond timestamp in the first 6 bytes, followed by a version marker, a variant marker, and 74 bits of randomness.Database primary keys and event IDs where you want UUIDs to sort chronologically — this keeps B-tree indexes fast, unlike v4's fully random ordering.

There are also v3 and v5 (deterministic, generated by hashing a namespace and a name — the same input always produces the same UUID), and v2 (a rarely used DCE security variant). This tool doesn't generate those because they're either deprecated in practice or need application-specific input rather than randomness. For everyday use, the choice is almost always between v4 (fully random, unpredictable) and v7 (time-ordered, database-friendly).

Why does sortability matter so much for v7? Databases like PostgreSQL and MySQL store primary keys in a B-tree index. Inserting fully random v4 values scatters writes across the whole index, causing page splits and cache misses that get worse as the table grows. Because v7's leading bits are a timestamp, new rows are inserted at the “end” of the index in roughly chronological order — much closer to the append-friendly behavior of a traditional auto-increment integer, while still being globally unique and generateable on any node without coordination.

UUID collision math: how unique is 'unique'?

A version 4 UUID has 122 bits available for randomness (128 total bits, minus 4 for the version and 2 for the variant). That gives 2^122 possible values — roughly 5.3 × 10^36, or 5.3 undecillion. To put that in perspective, that's many times more than the estimated number of grains of sand on Earth, or atoms in a mole of a substance.

The relevant question isn't “how many possible UUIDs are there” though — it's “how many would I need to generate before two collide.” That's the birthday problem: with n possible values, the probability of at least one collision after generating k items is approximately 1 − e^(−k² / 2n). For a 50% chance of any collision at all, you'd need to generate roughly 1.25 × √n UUIDs — about 2.7 × 10^18 (2.7 quintillion) v4 UUIDs.

Concretely: if you generated 1 billion UUIDs every second, it would take roughly 85 years of continuous generation before you'd have even a 50% chance of a single collision. Most real applications generate a tiny fraction of that over their entire lifetime, which is why UUID collisions are treated as a non-issue in practice — you're astronomically more likely to be struck by a meteorite than to see a genuine v4 UUID collision.

UUID v7 has slightly less pure randomness (74 bits instead of 122, since 48 bits are spent on the timestamp), but that randomness resets its collision risk every millisecond rather than sharing one giant pool — within any single millisecond, you'd need to generate around ~400 million v7 UUIDs before a 50% collision chance among just that millisecond's batch. For virtually every real workload, generating thousands of IDs per millisecond is already unrealistic, so v7 remains effectively collision-free for practical purposes.

Where UUIDs are used

  • Database primary keys. UUIDs let every service or node generate valid IDs without querying a central sequence, which is essential for distributed databases and microservices.
  • API request & trace IDs. Attaching a UUID to every API request makes it possible to trace a single call across logs, services, and retries.
  • Session tokens & API keys. Randomness makes v4 UUIDs hard to guess, which is why they're common as session identifiers (though dedicated secrets are preferred for anything security-critical).
  • File and object storage names. S3 buckets, CDN assets, and uploaded files are often renamed to a UUID to guarantee no two uploads ever collide, regardless of the original filename.
  • Software licensing & device identifiers. Product keys, install IDs, and hardware identifiers frequently use UUIDs so vendors can track activations without a central counter.
  • Version control & package systems. Some build systems and package managers tag artifacts with UUIDs to avoid naming collisions across independent publishers.
  • Testing & seed data. Developers generate bulk UUIDs to populate test databases, mock APIs, or fixtures with realistic-looking unique identifiers.
  • Idempotency keys. Payment and messaging APIs (like Stripe) use client-generated UUIDs as idempotency keys so a retried request is recognized as a duplicate rather than processed twice.

How to use this UUID generator

  1. Grab a single UUID. A fresh v4 UUID is generated the moment the page loads — copy it with one click, or hit Regenerate for a new one.
  2. Switch versions. Use the segmented control to switch between v4 (random), v7 (time-sortable, with a timestamp breakdown shown underneath), and Nil (the all-zeros UUID used as a placeholder or “empty” value).
  3. Generate in bulk. Set a quantity from 1 to 1,000 and the tool fills a monospace text box with that many UUIDs, one per line.
  4. Format for your use case. Toggle Uppercase, Remove hyphens, or Quotes + commas to get UUIDs ready to paste straight into code, JSON arrays, or a SQL INSERT statement.
  5. Copy or download. Use Copy all to grab the whole batch, or Download .txt to save it as a file.

Is this UUID generator safe and private?

Yes. Every UUID is generated locally in your browser using the Web Crypto API (crypto.getRandomValues and crypto.randomUUID), the same cryptographically secure random number generator used by browsers for encryption keys. Nothing is uploaded to a server, nothing is logged, and the tool works even offline once the page has loaded. That makes it safe to generate UUIDs for internal systems, database seeds, or anything else without worrying about the values being observed or stored elsewhere.

UUID generator FAQs for developers

  • Are UUID and GUID the same thing? Functionally, yes — GUID is Microsoft's name for the same 128-bit identifier format standardized as UUID. Any tool that generates one generates the other.
  • Can I use a UUID as a primary key? Yes, and it's common in distributed systems. Prefer v7 over v4 for primary keys when your database supports it, since the embedded timestamp keeps index inserts sequential and avoids the write-amplification problems random v4 keys cause at scale.
  • Do UUIDs need to be stored as strings? No — most databases support a native 16-byte binary UUID type (e.g. PostgreSQL's uuid column), which is smaller and faster to index than storing the 36-character hyphenated string.
  • Is a UUID a good idempotency key? Yes, as long as it's generated once by the client and reused on retries of the same logical operation — regenerating a new UUID on every retry defeats the purpose.

Frequently asked questions

What is a UUID generator used for?
A UUID generator creates random, globally unique 128-bit identifiers used as database primary keys, API request IDs, session tokens, file names, and idempotency keys — anywhere you need a unique ID without a central counter.
Is UUID the same as GUID?
Yes. GUID (Globally Unique Identifier) is Microsoft's term for the same identifier format standardized as UUID (Universally Unique Identifier) under RFC 9562. They're interchangeable in practice.
What's the difference between UUID v4 and v7?
v4 is fully random (122 bits of entropy), giving no information about when it was created. v7 embeds a 48-bit millisecond timestamp plus 74 random bits, so v7 UUIDs sort chronologically — which keeps database indexes fast — while v4 UUIDs sort randomly.
Can two UUIDs ever collide?
Mathematically yes, but the odds are negligible. A v4 UUID has about 5.3 × 10^36 possible values; you'd need to generate roughly 2.7 quintillion of them before a 50% chance of any collision, per the birthday problem.
Can I generate UUIDs in bulk?
Yes — set the quantity field to any number from 1 to 1,000 and the tool generates that many UUIDs at once, which you can copy as a list or download as a .txt file.
Does this tool store or upload the UUIDs I generate?
No. Every UUID is generated locally in your browser with the Web Crypto API and never sent to a server, so generation works offline and stays completely private.

Generate the ID, then shorten the link

fewly turns any URL into a short, branded, trackable link — free to start, no credit card.