Generate UUIDs and GUIDs (v1, v4, v7) instantly. Bulk output, formatting options and one-click copy. Free, no signup, runs in your browser.
Choose a version, set a quantity between 1 and 1000, pick an output format and generate. Copy a single value, copy the whole batch, or download it as a text file, a CSV or a JSON array. There is also a parser at the bottom of the page: paste any UUID and it reports the version, the variant, the five structural fields, and — for the time-based versions — the embedded timestamp decoded to an ISO date.
Everything is generated in your browser. Random bits come from the Web Crypto API’s
cryptographically secure generator, not Math.random. No values are sent anywhere, none
are stored, and no two visitors can be handed the same batch by a server that got its bookkeeping
wrong — because there is no server involved.
| Version | Built from | Sortable by creation time | Reach for it when |
|---|---|---|---|
| v4 | 122 random bits | No | The general-purpose default: tokens, correlation IDs, test fixtures, anything where unpredictability matters |
| v7 | 48-bit Unix millisecond timestamp + random bits | Yes | Database primary keys, event and log IDs, anything inserted in time order |
| v1 | Timestamp + clock sequence + node identifier | Roughly | Interoperating with a legacy system that already uses v1 |
| v5 | SHA-1 of a namespace UUID plus a name | No | You need the same input to always produce the same UUID |
| Nil | All zero bits | — | A defined placeholder for "no UUID" |
A v4 UUID is 128 bits of which 122 are random; the other six are fixed by the specification to mark the version and the variant. It encodes nothing. It reveals nothing about when it was made, on what machine, or in what order relative to its siblings. Two independent processes on opposite sides of the world can mint v4 identifiers with no coordination whatsoever and expect never to collide, which is the entire point of the format.
That opacity is a feature when the identifier will be visible — in a URL, an API response, a webhook payload — because a v4 value leaks no information and cannot be enumerated by incrementing. It is a liability inside a database index, for reasons below.
A v7 UUID puts a 48-bit Unix timestamp in milliseconds into the leading bits, then fills the rest with cryptographically secure random data. The consequence is the useful part: sorting v7 values as strings or as bytes sorts them by creation time, because the most significant bits are the clock.
That single property is what makes v7 the sensible default for database primary keys. B-tree indexes on most engines store keys in sorted order. Inserting sequential keys appends to the same region of the index, so the pages being written stay in memory and the tree grows tidily at one end. Inserting random keys — which is exactly what v4 gives you — scatters writes across the whole index. Every insert lands on a different page, that page has to be read in if it is not cached, and pages that fill up split. On a large table with a random primary key you get more buffer-pool churn, more page splits, more fragmentation and a physically larger index than the same data keyed in time order. This is the well-documented reason teams historically preferred auto-increment integers over UUID primary keys; v7 is the format that removes the reason.
The costs are real but small. A v7 value discloses its own creation time to anyone holding it, so do not use it where that is sensitive — it is a poor choice for a password-reset token or an unguessable share link, even though the random portion is generated securely. And two v7 values minted in the same millisecond have no defined order between them; v7 gives you coarse chronological ordering, not a strict monotonic sequence. If you need to know which of two events in the same millisecond came first, you need a real sequence number, not a UUID.
A v1 UUID also embeds a timestamp, but with two awkward differences from v7. The clock is a count of 100-nanosecond intervals since 15 October 1582 — the start of the Gregorian calendar — and the timestamp is split across three fields in a scrambled order, with the low-order bits first. That layout means v1 values do not sort chronologically as strings, which is why v1 never delivered the index benefit that v7 does.
The other difference is the node field, the last twelve hex digits. It was originally specified to hold the generating machine’s MAC address, which is why v1 has a privacy reputation: a v1 UUID could identify the physical host that produced it and reveal roughly when. Modern implementations, including the one behind this page, generate that node value randomly instead rather than reading a real network interface — a browser cannot see your MAC address in any case. Treat v1 as something to generate when you are matching an existing system’s format, and reach for v7 for anything new.
v5 is not random at all. It hashes a namespace UUID together with a name string using SHA-1 and formats the result as a UUID. Feed it the same namespace and the same name and you get the same value every time, on any machine, forever. That makes it the tool for deriving a stable identifier from something you already have — a domain name, a file path, an external system’s key — without storing a mapping table.
The four namespace UUIDs defined by the specification are offered directly, and you can supply your own:
6ba7b810-9dad-11d1-80b4-00c04fd430c8 — DNS, for hostnames6ba7b811-9dad-11d1-80b4-00c04fd430c8 — URL6ba7b812-9dad-11d1-80b4-00c04fd430c8 — ISO OID6ba7b814-9dad-11d1-80b4-00c04fd430c8 — X.500 distinguished nameTwo consequences follow from determinism. Generating a batch of v5 UUIDs with the same name gives you the same value repeated, which is correct behaviour rather than a bug. And because v5 is a hash of the input, anyone who can guess the name and knows the namespace can compute the UUID — so a v5 identifier derived from an email address is not a secret. Note also that this generator produces v5; it does not offer v3, the older MD5-based equivalent.
00000000-0000-0000-0000-000000000000 is a specific value defined by the standard: 128
zero bits, all fields zero. It is the canonical way to express "no UUID here" in a field
that must contain a syntactically valid UUID and cannot be null — a non-nullable database column
during a migration, a protocol field with a fixed width, a default in a struct.
Its trap is that it looks valid to every validator, so a nil UUID that arrives because of an
uninitialised variable rather than a deliberate choice will pass every check and fail every lookup.
Treating nil as a real error condition in your code is usually correct. It is worth knowing that the
standard also defines a max UUID of all f digits; this tool does not generate that one.
A v4 UUID has 122 random bits, so the space of possible values is 2 to the power of 122. That is a number with thirty-seven digits, and the practical consequence is that for any workload a normal application will ever produce, an accidental duplicate is not something to design around. Software engineering folklore is full of specific-sounding odds for this; most of them are repeated without a source, so here is the claim without a fabricated statistic: the space is large enough that collisions from correctly generated v4 UUIDs are not a realistic operational concern, and a unique constraint on the column is the appropriate and cheap belt-and-braces measure.
The failure that does happen in the real world is not the birthday problem — it is a broken random source. UUIDs generated from a poorly seeded pseudo-random generator, or from the same seed on many freshly booted identical VMs or containers, can and do repeat. That is a bug in the generator, not a property of the format. This page uses the browser’s cryptographic random source, which is the right one.
v7 collision behaviour differs slightly and favourably: because the leading bits are a timestamp, two v7 values can only collide if they were generated in the same millisecond and their random portions matched, which is a smaller space of opportunity than v4’s.
The same 128 bits get written down in several conventional ways, and different ecosystems expect different ones. Choose the one your target wants:
| Format | Example shape | Where you meet it |
|---|---|---|
| Standard | 550e8400-e29b-41d4-a716-446655440000 | The canonical form: lowercase, hyphenated, 36 characters |
| Uppercase | 550E8400-E29B-41D4-A716-446655440000 | Some Microsoft and mainframe tooling |
| No hyphens | 550e8400e29b41d4a716446655440000 | 32 characters; compact storage, URL path segments, some APIs |
| Braces | {550e8400-e29b-41d4-a716-446655440000} | Windows registry keys, COM GUIDs, .NET’s "B" format |
| URN | urn:uuid:550e8400-e29b-41d4-a716-446655440000 | The registered URN namespace, used in XML and RDF |
These are presentation choices only — the underlying value is identical in all five. Case is not significant when comparing UUIDs, and the canonical output form is lowercase, but a string comparison in your code is case-sensitive, so a system storing uppercase and a system storing lowercase will fail to match records that are in fact the same. Normalise on the way in. Similarly, if you strip hyphens for storage, strip them consistently; a mixed table is a long afternoon.
The quantity field takes any number from 1 to 1000, with one-click shortcuts for 10, 100 and 1000 — enough to seed a test fixture, populate a staging table or pre-allocate a block of identifiers. The whole batch can be copied to the clipboard in one action, or downloaded three ways: plain text with one UUID per line, CSV with columns for the UUID, the version and a generation timestamp, or JSON with the version, format, count, timestamp and the array of values. All three apply the format you selected.
Paste a UUID into the parser and it reports what the value actually is, which is faster than counting hex digits by eye. It gives you the version number read from the version nibble, the variant, and the five canonical fields — time-low, time-mid, time-high-and-version, clock-sequence and node — broken out separately. For v1 and v7 it also decodes the embedded timestamp to an ISO 8601 date and to milliseconds since the Unix epoch, each version using its own clock convention.
That timestamp readout answers real questions. When was this record actually created, when the
created_at column is missing or looks wrong? Is this identifier from the migration or from
after it? Is the batch someone sent me actually from the window they claim? It also demonstrates the
privacy point about v7 and v1 in the most direct way possible: the creation time is not metadata
alongside the identifier, it is inside it, readable by anyone.
A UUID (Universally Unique Identifier) generator creates 128-bit identifiers that are guaranteed to be unique across space and time without requiring a central registration authority. UUIDs are formatted as 32 hexadecimal characters displayed in five groups separated by hyphens: 550e8400-e29b-41d4-a716-446655440000. They are fundamental to distributed systems, databases, and APIs where globally unique identifiers are needed without coordination between systems.
UUIDs solve a critical problem in distributed computing: how do independent systems create identifiers that will never collide? Auto-incrementing database IDs work within a single database but fail when merging data from multiple sources, synchronizing offline clients, or building microservices architectures. UUIDs eliminate this problem entirely.
The UUID specification (RFC 9562, formerly RFC 4122) defines several versions, each generating uniqueness through different mechanisms:
| Version | Name | Generation Method | Use Case |
|---|---|---|---|
| v1 | Time-based | Timestamp + MAC address | Legacy systems needing temporal ordering |
| v3 | Name-based (MD5) | MD5 hash of namespace + name | Deterministic IDs from known inputs |
| v4 | Random | 122 bits of random data | General-purpose unique identifiers |
| v5 | Name-based (SHA-1) | SHA-1 hash of namespace + name | Deterministic IDs (preferred over v3) |
| v7 | Time-ordered | Unix timestamp + random data | Sortable IDs for databases (newest) |
UUID v4 is the most commonly used version. With 122 random bits, the probability of generating two identical UUIDs is astronomically low—you would need to generate 2.71 × 10^18 UUIDs before having a 50% chance of a single collision.
UUID v7 (introduced in RFC 9562) is gaining adoption because it embeds a Unix millisecond timestamp in the first 48 bits, making UUIDs naturally sortable by creation time. This significantly improves database index performance compared to random v4 UUIDs.
A UUID (Universally Unique Identifier) is a 128-bit number guaranteed to be unique across space and time without coordination. Format: 8-4-4-4-12 hexadecimal digits (e.g., 550e8400-e29b-41d4-a716-446655440000). Why use UUIDs: (1) Globally unique - No central registry needed, generate anywhere without conflicts. (2) Distributed systems - Multiple systems can generate IDs independently. (3) Merge-safe - Combining databases never creates ID collisions. (4) Security - Non-sequential prevents enumeration attacks. (5) Migration-friendly - Move records between systems without ID conflicts. Use cases: Database primary keys, Microservices communication, File naming, Session IDs, API request IDs, Document identifiers. Alternative: Auto-incrementing integers are simpler but: Reveal record counts, Cause merge conflicts, Enable enumeration attacks, Require coordination. Use UUIDs when: Working with distributed systems, Need globally unique IDs, Merging databases, Building APIs, Prioritizing security.
UUID has multiple versions for different use cases: UUIDv1 (Time-based) - Includes timestamp and MAC address, Sortable chronologically, Reveals creation time and computer MAC, Privacy concern - MAC address is identifiable, Use when: Need chronological sorting, Privacy not a concern. UUIDv4 (Random) - Purely random (122 bits of randomness), No embedded information, Most popular version, Collision probability: 1 in 5.3 × 10^36 for one billion UUIDs per second for 100 years, Use when: Need maximum randomness, Privacy important, No sorting required. UUIDv5 (Name-based SHA-1) - Generated from namespace + name using SHA-1 hash, Deterministic - same input always produces same UUID, Reproducible without storage, Use when: Need reproducible IDs, Deriving UUIDs from existing identifiers, Content-addressable systems. Deprecated: UUIDv2 (DCE Security) - rarely used, UUIDv3 (Name-based MD5) - obsolete, use v5 instead. Recommendation: Use v4 for general purposes, v1 when you need time sorting, v5 when you need deterministic generation.
UUIDs are designed to be unique with astronomically low collision probability: UUIDv4 Collision Math: 122 random bits = 2^122 possible values (5.3 × 10^36), Probability of collision with 1 billion UUIDs per second for 100 years: ~0.0000000001%, Need to generate 2^61 UUIDs to have 50% collision chance, Effectively impossible in practice. However, collisions CAN happen if: Using broken random number generators (Mersenne Twister, poor seeding), Generating millions of UUIDs in tight loops with weak RNG, Virtualization/containerization cloning with same RNG state, Bugs in UUID library implementations. UUIDv1 uniqueness depends on: MAC address uniqueness (generally guaranteed), Clock accuracy and monotonicity, More predictable but still effectively unique. Best practices: Use cryptographically secure random number generators (not Math.random()), Don't implement UUID generation yourself - use tested libraries, Test UUID uniqueness in your application, Consider UUIDv7 (time-ordered) for databases requiring sortability. In practice, if using proper libraries, collisions are not a real concern.
The UUID vs auto-increment debate has important trade-offs: UUIDs as Primary Keys - Pros: Globally unique (merge databases safely), Generate client-side (reduce database roundtrips), Distributed-friendly (multiple services generate IDs), Secure (can't enumerate records), Partition-friendly (distribute across shards). UUIDs as Primary Keys - Cons: Larger storage (16 bytes vs 4-8 bytes for integers), Slower lookups and joins (larger indexes), Random insertion causes index fragmentation (performance hit), Harder to debug (complex values), URL-unfriendly (long identifiers). Auto-Increment Integers - Pros: Small storage (4-8 bytes), Fast lookups and joins (compact indexes), Sequential insertion (better performance), Human-readable, URL-friendly. Auto-Increment Integers - Cons: Database-dependent (hard to merge), Reveal record counts (security/competitive issue), Enumeration attacks (guess valid IDs), Distributed systems problems (coordination needed). Modern solution: UUIDv7 (coming) - Time-ordered UUIDs combining benefits of both. Recommendation: Use auto-increment for: Single database systems, Internal applications, Performance-critical apps. Use UUIDs for: Microservices, APIs, Multi-tenant SaaS, Distributed systems, Security-sensitive apps.
UUID storage varies by database with significant performance implications: PostgreSQL: Native UUID type (16 bytes), use uuid column type, Supports indexes, Very efficient. MySQL 8.0+: Native UUID type, use UUID or BINARY(16), Convert string to binary: UUID_TO_BIN(), Convert back: BIN_TO_UUID(). MySQL 5.7 and earlier: Store as CHAR(36) (wasteful - 36 bytes), Better: Store as BINARY(16), Manual conversion: UNHEX(REPLACE(uuid, '-', '')). SQL Server: Native uniqueidentifier type (16 bytes), Supports indexes, Use NEWSEQUENTIALID() for better performance (reduces fragmentation). MongoDB: Native UUID/GUID support, store as BinData type. Performance Tips: (1) Always store as binary (16 bytes), never as string (36 bytes). (2) Use indexed UUID columns sparingly. (3) Consider UUIDv1 or UUIDv7 for time-ordering (reduces index fragmentation). (4) Partition by UUID prefix if needed. (5) Use covering indexes for UUID lookup queries. Storage comparison: UUID as CHAR(36): 36 bytes, UUID as BINARY(16): 16 bytes (56% savings), Integer as INT: 4 bytes, Integer as BIGINT: 8 bytes. For high-volume systems, the storage difference matters significantly.
UUID generation is built into most languages: JavaScript/Node.js: crypto.randomUUID() (Node 14.17+, browser), require('uuid').v4() (npm package). Python: import uuid, uuid.uuid4() (random), uuid.uuid1() (time-based), uuid.uuid5() (name-based). Java: java.util.UUID, UUID.randomUUID() (v4), UUID.nameUUIDFromBytes() (v3/v5). C#/.NET: System.Guid, Guid.NewGuid() (v4). PHP: uniqid() (not true UUID), Ramsey\\Uuid\\Uuid::uuid4() (proper library). Ruby: require 'securerandom', SecureRandom.uuid. Go: github.com/google/uuid, uuid.New() or uuid.NewRandom(). Rust: use uuid::Uuid, Uuid::new_v4(). SQL: PostgreSQL: gen_random_uuid(), MySQL: UUID(), SQL Server: NEWID(). Key principles: Use built-in crypto-secure functions, Don't implement your own, Avoid Math.random() or similar weak RNGs, Test for uniqueness in critical applications. Most languages have battle-tested UUID libraries - never roll your own.
UUID (Universally Unique Identifier) and GUID (Globally Unique Identifier) are the same thing with minor differences in terminology and presentation: UUID - Standard term (RFC 4122), Used in most technologies and languages, Written with lowercase hex digits (550e8400-e29b-41d4-a716-446655440000), Common in open-source, Linux/Unix, APIs. GUID - Microsoft's term for the same concept, Used primarily in Windows and .NET ecosystem, Often written with uppercase hex digits (550E8400-E29B-41D4-A716-446655440000), Sometimes shown in Windows registry format with braces: {550E8400-E29B-41D4-A716-446655440000}. Technical equivalence: Both are 128-bit identifiers, Same format: 8-4-4-4-12 hex digits, Same generation algorithms, Same uniqueness guarantees, Fully interoperable. Practical differences: Case sensitivity (lowercase vs uppercase is convention, not requirement), Brace formatting (cosmetic), API/function naming (UUID.randomUUID() vs Guid.NewGuid()). Recommendation: Use "UUID" for cross-platform systems, Use "GUID" when working specifically with Microsoft technologies, Convert between formats as needed (trivial - just case and braces), Don't worry about the distinction - they're the same thing.
UUIDv5 is ideal when you need reproducible IDs from existing data: How UUIDv5 works: Takes namespace UUID + name string, Applies SHA-1 hash, Produces deterministic UUID (same input → same output), Version bits set to 5. Use cases: (1) Content-addressed storage - File SHA-256 hash → UUID for referencing. (2) Idempotent API operations - Request parameters → UUID ensures same request gets same ID. (3) Derived identifiers - User email → UUID without storing mapping. (4) Data migration - Old ID → UUID for backward compatibility. (5) Reproducible test data - Generate consistent UUIDs across test runs. Standard namespaces: DNS: 6ba7b810-9dad-11d1-80b4-00c04fd430c8 (domain names), URL: 6ba7b811-9dad-11d1-80b4-00c04fd430c8 (URLs), OID: 6ba7b812-9dad-11d1-80b4-00c04fd430c8 (ISO OIDs), X500: 6ba7b814-9dad-11d1-80b4-00c04fd430c8 (X.500 DNs). Example: uuid5(DNS_NAMESPACE, "example.com") → Always produces same UUID. Don't use v5 for: Primary security identifiers (not random), Session tokens (predictable), One-time codes (not random enough). Recommendation: Use v5 when repeatability matters, v4 when randomness required.