UUID Generator — v4 UUIDs Online
Generate v4 UUIDs (random, 128-bit) and v7 UUIDs (timestamp-ordered). Free, fast, cryptographically secure, entirely client-side.
UUID v4 — 128 bits of cryptographic randomness, RFC 4122 compliant.
What is a UUID?
A UUID (Universally Unique Identifier, sometimes called a GUID in Microsoft contexts) is a 128-bit value used to uniquely identify something without coordinating with a central authority. Two independent systems can generate a UUID at the same moment and the odds of collision are vanishingly small — small enough that every modern database, distributed system, and API uses UUIDs as primary keys, tracking tokens, session identifiers, and object handles.
UUIDs are written as 32 hexadecimal digits split by hyphens into five groups: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Four bits of the third group encode the version, and two bits of the fourth group encode the variant. The rest is either random, time-derived, or a combination.
UUID v4 vs v7 — which should you use?
This tool generates two versions:
- UUID v4— 122 bits of cryptographic randomness. The most common version, standardized in RFC 4122. Use when you need a random identifier and don't care about ordering.
- UUID v7 — 48-bit Unix timestamp (milliseconds) followed by 74 random bits. Standardized in RFC 9562 (May 2024). Use when you need a random identifier that is also time-sortable.
The difference matters most for database primary keys. A table with a v4 UUID primary key has its rows inserted in random order in the B-tree index, which destroys page locality and slows inserts dramatically on large tables. A v7 UUID primary key inserts in roughly timestamp order, which keeps the B-tree tail hot and matches the performance of an auto-incrementing integer — with the uniqueness and non-guessability benefits of a UUID.
If you are designing a new database schema today, prefer v7. If you are matching an existing API or column format, use v4. If you are generating session tokens or one-off correlation IDs where ordering doesn't matter, v4 is fine and marginally simpler.
Examples
v4 (random): 550e8400-e29b-41d4-a716-446655440000 v4 (random): f47ac10b-58cc-4372-a567-0e02b2c3d479 v7 (timestamped): 018fdb85-d8c0-7a2e-8b3f-44a9c5e6f1e7 v7 (timestamped): 018fdb85-d8d2-7f8c-91b5-2d4e7a3f8b91
Notice that the two v7 values start with the same prefix (018fdb85-d8) — that's the shared timestamp portion. Two v7 UUIDs generated milliseconds apart will differ only in the last few bytes, which is exactly what makes them sort correctly.
How this tool generates UUIDs
All randomness comes from crypto.getRandomValues, the browser's cryptographically-secure random number generator. For v4 specifically, the tool uses crypto.randomUUID() when available — a browser-native primitive that is guaranteed to be RFC 4122 compliant. For v7, the tool assembles the timestamp and random portions by hand because crypto.randomUUID() only generates v4.
Nothing about the generated UUIDs is predictable from prior output, and no internal state leaks between calls. You can safely use the output as session tokens, API keys, or anything else requiring unguessable identifiers — the source is the same CSPRNG browsers use for Web Crypto operations.
How to use this UUID generator
- Choose the version (v4 random, v7 time-ordered) — the list regenerates immediately on any toggle
- Pick a count from the presets (1, 5, 10, 25, 100) or type a custom number up to 500
- Click Generate to produce a fresh batch with the current settings (or just change any control — the list updates automatically)
- Click Copy next to any single UUID to copy just that one, or Copy all to copy the full list separated by newlines
Privacy and security
Every UUID is generated in your browser.No network request is made when you click Generate; the tool reads from your browser's CSPRNG and nothing more. There is no logging of the generated values, no cookie tied to your usage, no way for the tool to see what UUIDs you produced. You can safely use this to generate production database IDs, API keys, session tokens, or any other sensitive identifiers.
Frequently asked questions
Is a UUID really unique?
Not mathematically, but close enough for any practical purpose. A v4 UUID has 122 random bits, which means you would need to generate about 2.71 quintillion (2.71 × 1018) UUIDs before the probability of collision exceeds one in a billion. At a generation rate of 1 billion UUIDs per second, that's roughly 86 years. In other words: don't worry about collisions.
What's the difference between UUID and GUID?
None — they're the same 128-bit format. "GUID" (Globally Unique Identifier) is Microsoft's name for the same concept; "UUID" is the RFC / POSIX name. Some Microsoft tooling formats GUIDs in braces ({xxxxxxxx-...}) or without hyphens; the underlying bits are identical.
Can I use v4 UUIDs as database primary keys?
You can, but you probably shouldn't for any table that will grow past a few million rows. The random insertion order destroys index locality in every B-tree database (PostgreSQL, MySQL, SQLite, SQL Server), causing write amplification and cache-miss slowdowns that get worse as the table grows. Use v7 instead, or use a sequential ID with a separate public UUID column if you need both ordering and unguessability.
Are v4 UUIDs predictable?
No — the 122 random bits come from a cryptographically-secure random number generator, which means knowing past UUIDs gives you zero information about future ones. This is why v4 UUIDs are safe to use as session tokens or unguessable URL identifiers. v1 UUIDs (not generated by this tool) are a different story — they include the MAC address of the generating host and can leak information about where they came from.
Does this tool use Math.random?
No. Everything uses crypto.getRandomValues (orcrypto.randomUUID() directly for v4). Math.random is not cryptographically secure and would be wrong for any UUID that needs to be unguessable.
Can I generate UUID v1, v3, v5, or v6?
Not in this version. v4 and v7 cover the vast majority of real-world use cases. v1 (MAC + time) has privacy downsides — it leaks host identity — so it's rarely a good choice. v3 and v5 (namespace + hash) are useful but niche; they're deterministic, not random, so they don't fit a "generate random UUIDs" tool. v6 is an improvement on v1 that hasn't seen wide adoption.
How do I validate or parse a UUID I already have?
That's a separate tool we may add later. For now, you can verify the format manually: 32 hex digits split into groups of 8-4-4-4-12 by hyphens. The first digit of the third group is the version (4, 7, etc.). The first two bits of the fourth group should be 10 (which means the fourth group's first hex digit is between 8 and b).
Is my data sent anywhere?
No — UUIDs are generated entirely in your browser. There is no network request when you click Generate and no server ever sees the values.
Related tools
- DicewareGenerate strong, memorable passphrases using the EFF short wordlist. Cryptographically random, shows entropy in bits. Runs in your browser.
- Hash GeneratorGenerate MD5, SHA-1, SHA-256 and SHA-512 hashes online. Free, fast and 100% client-side — your input never leaves the browser.
- JSON DiffCompare two JSON objects and see added, removed, and changed values. Free, fast, and 100% client-side — your data never leaves your browser.