UUID Generator_

Generate UUIDs (GUIDs — same thing) in every version that matters: random v4, time-ordered v7 with guaranteed ordering inside a single millisecond, legacy v1, and deterministic v3/v5 from a namespace and name — up to 1,000 at once, formatted with your case, hyphen, brace, or URN preferences. An inspector decodes any UUID you paste: version, variant, and the embedded creation time for v1, v6, and v7.

Every identifier is generated in your browser by its cryptographic random source. That matters more than it sounds: an ID minted on someone else's server is an ID someone else has seen.

toolkit.codes/uuid-generator

Fully random — the default. 122 random bits from your browser’s CSPRNG.

Click Generate for fresh UUIDs
Inspector — paste any UUID
UTF-8
Ready
100% LOCAL
Input
Nothing, for the random versions — you pick a version and a count. v3 and v5 are the exception: they take a namespace and a name, and produce the same identifier every time from the same pair.
Output
Up to a thousand identifiers at once, in the case and delimiter style you need — plain, braced, URL-form, or as a quoted list ready to paste into code.
Processing
Generated in this tab from the browser crypto API, never from Math.random. Nothing is requested from a server, which also means no two visitors can be handed the same batch.
Limits
A UUID is unique, not secret and not unguessable in every version. v1 embeds a timestamp and v7 embeds one deliberately, so neither is a good choice for anything that should not be enumerable.
Also called GUID
A GUID is the same 128-bit value under Microsoft’s name for it, written the same way. Anything generated here is a valid GUID, and the braced form is the one .NET and the Windows registry expect.

UUIDs, GUIDs, and which version you actually want

UUID or GUID — one format, two names

A UUID (universally unique identifier) and a GUID (globally unique identifier — Microsoft's name for it) are the same 128-bit value written the same way: 32 hex digits in a 8-4-4-4-12 pattern. The uniqueness isn't enforced by any registry; it's probability. A v4 UUID carries 122 random bits, so the chance of two ever colliding is so small that you would need to generate a billion UUIDs per second for about 86 years to reach a 50% chance of one duplicate. That is why independent systems can mint IDs with no coordination — a guid uuid generator on this page and one in your production cluster will simply never collide.

Choosing a version

The version digit changes what the bits mean. v4 is pure randomness — the right default for request IDs, correlation IDs, anything where order doesn't matter. v7 (RFC 9562, 2024) leads with a 48-bit millisecond timestamp: newly generated IDs sort after older ones, which databases love; this page additionally guarantees strict ordering within a single millisecond using the RFC's counter method. v1 is the 1990s time-based design that embedded your MAC address — here it is generated with a random node (multicast bit set, per the RFC) precisely so it can't identify your machine. v3/v5 are different animals: deterministic hashes of a namespace plus a name, so the same input always yields the same UUID — v5 (SHA-1) is the one to use; v3 (MD5) exists for compatibility with systems that already chose it.

Random vs time-ordered keys — the database story

Using v4 UUIDs as primary keys hurts at scale for a mechanical reason: B-tree indexes keep keys in order, and fully random keys land in random pages — every insert dirties a different part of the index, caches thrash, pages split. v7's timestamp prefix makes new keys land at the right edge of the index like an auto-increment does, while staying globally unique and unguessable enough for internal use. If you are choosing a key format for a new table today, v7 is the answer to the question that used to be answered with "UUID but shuffled" workarounds like ULIDs.

Generating UUIDs in code

Every mainstream runtime has this built in. Python: import uuid; uuid.uuid4() (and uuid.uuid5(uuid.NAMESPACE_DNS, "example.com") for name-based). Java: UUID.randomUUID(). JavaScript in any modern browser and Node 19+: crypto.randomUUID() — the same call this page uses. .NET: Guid.NewGuid(), with Guid.CreateVersion7() in .NET 9. For v7 elsewhere, the uuid npm package (v10+) and Python's uuid6 library cover it until stdlibs catch up.

Pick a version, set the count, copy the batch

  1. 01Pick a version tab — the line under the tabs says what that version encodes and when to use it. v4 is the right answer when unsure.
  2. 02Set the count (up to 1,000) and click Generate. For v3/v5, choose a namespace (DNS, URL, OID, X.500, or a custom UUID) and type the name — those two inputs fully determine the result, so the count locks to one.
  3. 03Format the output your way: uppercase, hyphen-less, braced for Windows registry work, or urn:uuid: form. Formatting applies live to what you already generated — no need to regenerate.
  4. 04Paste any UUID into the inspector to decode it: version, variant, and for time-based versions the embedded creation moment, straight from the bits.

Four jobs, and the version each one wants

Request IDs across services

Every incoming request gets a v4; every log line carries it; tracing a failure means grepping one ID across all services.

Generate (v4)
x-request-id: 9f46a2f0-…-c3d1
Why v4
no order needed, no information
leaked — pure correlation

Primary keys that insert in order

A new table needs globally unique keys without the index fragmentation of random ones.

Generate (v7, bulk)
0198c2ff-51a2-7… 
0198c2ff-51a2-7… (sorted!)
Why v7
timestamp prefix → inserts land
at the index edge, like serial

Stable IDs from names

Import the same customer file twice and get the same IDs — no duplicate detection needed.

v5, DNS namespace
name: acme-corp.example
Always
the identical UUID, on every
machine, in every language

Reading an unknown UUID from a log

An ID appears in an incident timeline — the inspector says what kind it is and when it was minted.

Inspector
0192aa3f-2f40-7abc-…
Decoded
version 7 · RFC 9562 variant
created ≈ 2024-10-20T14:05:20Z

UUID versions at a glance

VersionEncodesUse whenSortable?Privacy
v4122 random bitsDefault: request IDs, correlation, general identifiersNoLeaks nothing
v748-bit unix-ms time + 74 random bitsDatabase keys, event IDs, anything you’ll sort or range-scanYes (ms order)Leaks creation time
v160-bit gregorian time + clock seq + nodeLegacy compatibility onlyNot lexicallyClassically leaks MAC + time (random node here)
v3MD5(namespace + name)Compatibility with systems already using itNoReveals nothing new, but MD5 is dated
v5SHA-1(namespace + name)Deterministic IDs from names — same input, same UUIDNoAnyone with the name can recompute it
v6v1 fields reorderedMigrating v1 systems to sortable form — new systems use v7YesAs v1
NIL / MaxAll zeros / all onesSentinels: "no UUID" and range bounds

v6 is listed for completeness — RFC 9562 defines it, this page's inspector decodes it, and new designs should reach for v7 instead.

Anatomy of a UUID

PieceExampleMeaning
Full form0192aa3f-2f40-7abc-89de-0123456789ab32 hex digits, grouped 8-4-4-4-12
Version digit0192aa3f-2f40-7abc-…First digit of the third group — here 7, a v7 UUID
Variant digit…-7abc-89de-…First digit of the fourth group; 8, 9, a, or b means RFC 9562 layout
v7: timestamp0192aa3f2f40First 12 hex digits = milliseconds since 1970 (here 2024-10-20T14:05:20.776Z)
v7: counter…-7abc-…The 12 bits after the version — this page uses them to keep same-millisecond IDs ordered
v1: node…-0123456789abLast 12 hex digits; lowest bit of the first byte set = random, not a MAC

Only two digits are ever fixed-purpose across versions: the version and variant positions. Everything else is defined per version — which is exactly what the inspector reads.

Habits that keep identifiers boring

  • Store and compare UUIDs lowercase: RFC 9562 says emit lowercase, accept any case — mixed-case string comparison is a classic intermittent bug.
  • Choosing keys for a new table? v7 in a native UUID column type — never as a 36-char VARCHAR, which triples the storage and slows every join.
  • Bulk-generate your test fixtures once and download them — hardcoded fixture IDs beat regenerating and re-diffing every run.
  • Use v5 (not v3) for name-based IDs, and record which namespace you chose — the namespace is part of the identity.
  • The braces style is for Windows/registry/COM contexts that require it; nothing else expects braces, and many parsers reject them.
  • Paste before you trust: an "ID" from an external system that fails the inspector is not a UUID, and treating it as one will bite the first time you cast the column.

What a UUID does not promise you

v4 will not collide — v1 tells on you instead

The collision math for v4 is astronomically safe. Classic v1 has the opposite problem: it embeds the generating machine’s MAC address and a fine-grained timestamp — famously used to trace documents and predict IDs. This page generates v1 with a random multicast node, and the inspector flags whether any v1 you paste used a real MAC or a random one.

v7 leaks creation time by design

Sortability IS a timestamp in the open: anyone who sees a v7 can read the millisecond it was minted — the inspector above does. For internal keys that is usually fine and often useful; for public-facing IDs where creation time is sensitive (user signups, medical records), use v4 and sort by a separate column.

Random primary keys fragment indexes

v4 keys insert into random B-tree pages: page splits, cold caches, bloated write-ahead logs. It shows up only at scale, which is why it surprises teams at the worst time. v7 (or the database’s own sequential ID plus a v4 external ID) is the standing fix.

Case sensitivity is a real bug source

The same UUID uppercased and lowercased is one value to Postgres’s uuid type and two values to a string comparison, a Set key, or a case-sensitive join. Normalize to lowercase at every boundary — the format toggle here uppercases for display standards like Windows registry work, not for storage.

UUIDs are not secrets

Unguessable is not the same as authorization. A v4 in a URL is fine as an identifier, but if possession of the ID is the only thing protecting the resource, you have built a capability token out of something logged in every proxy, browser history, and Referer header. Auth checks the who; the UUID only names the what.

Versions, entropy, and where the bits come from

Versions
v4 (crypto.randomUUID with a getRandomValues fallback), v7, v1, v3, v5, plus the NIL and Max constants — all per RFC 9562
v7 monotonicity
RFC 9562 §6.2 method 1: the 12-bit rand_a field is a counter seeded randomly each millisecond with headroom; overflow nudges the timestamp — strictly increasing output, verified in tests over 10,000 back-to-back IDs
v1 node
Random 48-bit node with the multicast bit set (§6.10) and a random clock sequence per page load — your MAC address is never read, or readable
v3 / v5
Namespace + name hashing per the RFC: MD5 implemented in-page (WebCrypto has none), SHA-1 via crypto.subtle; DNS, URL, OID, X.500, and custom namespaces
Inspector
Accepts canonical, braced, urn:uuid:, and bare-hex forms in any case; decodes version, variant, v1/v6/v7 timestamps, clock sequence, and node
Bulk
Up to 1,000 per batch, newline-separated, copyable and downloadable as uuids.txt
Formats
Lowercase/uppercase, hyphens on/off, braces, URN — reformatting applies to the existing batch without regenerating
Processing
All generation uses your browser’s CSPRNG locally — no identifier ever exists anywhere but this tab until you copy it

Questions about UUIDs, GUIDs and versions

Are UUIDs really unique?

Statistically, yes — v4 draws from 2¹²² possibilities, so duplicates are not a practical concern at any real-world scale. The guarantee is probabilistic, not registered: nothing checks for collisions, and nothing needs to.

What is the difference between UUID and GUID?

Nothing but the name. GUID is Microsoft’s term for the same RFC format; Windows tooling tends to display them uppercase in braces, which is what the braces style here reproduces. Every UUID is a valid GUID and vice versa.

How do I generate a UUID in Python, Java, or JavaScript?

Python: uuid.uuid4() from the standard library. Java: UUID.randomUUID(). JavaScript/Node: crypto.randomUUID() — identical to what this page calls. For v7, use uuid (npm) or uuid6 (PyPI) until the standard libraries add it.

Which version should I use for database keys?

v7. Its millisecond-timestamp prefix means new rows insert at the end of the index instead of fragmenting it, and it stays globally unique across services. Use a native uuid column type, and remember the trade-off: creation time is readable from the key.

Can I tell when a UUID was created?

For v1, v6, and v7 — yes: the timestamp is in the bits, and the inspector on this page decodes it to the millisecond. v4 encodes nothing but randomness, and v3/v5 encode only a hash, so neither reveals any time.

Are these UUIDs generated on a server?

No — and for identifiers that is worth caring about. Everything here is minted by your browser’s crypto source; a generator that produces IDs server-side has, by definition, a record of every ID it ever handed out. The security policy on this page blocks network calls from tool code, and the test suite asserts it.