Generate a UUID — Free v1/v4/v7 Generator
Choose a UUID version in the UUID Generator — v4 for pure randomness, v7 for a time-ordered, sortable ID, or v1 for a timestamp-based one — then pick how many you need and whether you want hyphens, braces, or uppercase formatting. Your UUIDs appear ready to copy, created locally through your browser's Web Crypto API.
Need a collision-proof way to identify your entries, resources, or items across multiple services without coordinating with any central authority? This UUID Generator gives you cryptographically random, instantly ready unique ids — the kind that software developers and IT professionals rely on every day. Whether you're assigning primary keys in a relational database, generating session IDs for a web application, or wiring up services that must never produce conflicting unique keys, understanding what you're generating — and which version to choose — makes all the difference.
What Is a UUID? An Online UUID Generator Primer
A UUID (universally unique identifier) is a 128-bit identifier — specifically a 128-bit value stored as 16 bytes — used in computer systems to uniquely label information, items, and resources without requiring a central coordinating authority. Every UUID is represented as 32 hexadecimal characters arranged into five groups separated by hyphens in the canonical 8-4-4-4-12 format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxA real example looks like this: 550e8400-e29b-41d4-a716-446655440000. Think of UUIDs as digital fingerprints for data — each one is genuinely one-of-a-kind. The UUID specification is formalised in RFC 4122 (2005) and its successor RFC 9562 (2024), which together define the uuid structure, uuid layout, version and variant bits, and uuid formatting rules that every conforming uuid tool must follow.
Three properties make universally unique identifiers indispensable in modern software development:
- Universality — any machine, service, or node can generate a UUID independently without contacting a shared coordinator or authoritative registry.
- Uniqueness — the algorithm behind UUID generation makes accidental collision extraordinarily unlikely, achieving near zero duplication at realistic scales. This property is what we call database uniqueness in practice.
- Versatility — UUIDs serve as database keys, session labels, access credentials, event markers, file names, and unique object labels across every major programming language and platform.
UUID vs. GUID — Are These the Same Identifier?
You will often see both terms in documentation. A GUID (globally unique identifier) and a UUID refer to the same 128-bit concept. UUID and GUID are interchangeable terms in practice; the difference is purely historical convention. GUID is the terminology favoured by Microsoft technologies — in .NET, the System.Guid type represents a uuid-compatible value. The uniqueidentifier data type in SQL Server stores the same uuid-compatible value. Modern specification documents, including RFC 9562, use the UUID label universally, but if you encounter a guid tool or guid-oriented documentation, you are working with exactly the same uuid specification.
The uuid vs guid question is especially common among developers migrating between Microsoft technologies and open-source stacks. Rest assured: a System.Guid in C# and a uuid column in a relational database hold identical 128-bit numbers — interoperability is built in.
How Unique Is a UUID — Really? Understanding UUID Collision Probability
UUIDs are not mathematically guaranteed to be unique, but they are designed so that accidental collision is statistically negligible for any realistic workload. A UUID v4 reserves 6 bits for the version and variant, leaving 122 random bits. That yields:
$$2^{122} \approx 5.3 \times 10^{36}$$
That is roughly 5.3 undecillion possible values — or 5.3 × 10^36 combinations — an astronomically large space. The collision probability at normal application scale is so low it is effectively zero for any practical use case.
To put it concretely: only after generating 1 billion UUIDs every second for the next 100 years would the probability of creating just one duplicate UUID reach approximately 50%. Alternatively, the probability of one duplicate would be about 50% if every person on Earth owned 600 million UUIDs.
The quality of the random number generator matters. UUIDs should be produced using a cryptographically secure random source — pseudo-random numbers from a weak source can reduce effective entropy and slightly increase collision risk. This generator uses a cryptographically secure random source, ensuring maximum randomness and near zero duplication.
UUID Versions Explained — How to Generate UUID for the Right Purpose
The uuid versions system defines distinct algorithms for structuring and generating UUIDs. A higher version number does not mean a better UUID — each version serves a different purpose. The table below summarises all current uuid variants as defined across RFC 4122 and the updated RFC 9562 specification:
| Version | Description |
|---|---|
| UUID v1 (uuid version-1) | Time-based UUID using a unix epoch value and mac address. Encodes the time of generation, which can reveal the host machine's identity. |
| UUID v2 (uuid version-2) | DCE security variant — similar to v1 but includes POSIX UID/GID data. Rarely used in modern applications. |
| UUID v3 (uuid version-3) | Name-based uuid using namespace-based hashing with MD5. Produces repeatable, deterministic uuids from a namespace + name pair. |
| UUID v4 (uuid version-4) | Randomly generated UUID using 122 random bits. The most widely used version. Highest randomness. |
| UUID v5 (uuid version-5) | Name-based uuid using namespace-based hashing with SHA-1 (sha1). Preferred over v3 when repeatable derived values are needed. |
| UUID v6 | Restructured time-based format — a reorganised layout of the v1 structure for improved database indexing. |
| UUID v7 | Modern sortable uuid: unix epoch value combined with random data. Sortable by creation time. Defined by RFC 9562. |
| UUID v8 | Application-defined uuid — vendor-specific or experimental layouts where the application controls all fields. |
For most new projects, your choice comes down to UUID v4 or UUID v7. UUID v3 and UUID v5 are the right pick when you need repeatable values derived consistently from a known namespace. UUID v6 offers a restructured time-based layout useful for legacy systems requiring a time-encoded uuid with better database indexing than v1.
UUID v4: The Random UUID Standard for General-Purpose Identification
UUID v4 is the most popular version among software developers because it is purely random. It uses 122 random bits (with the remaining 6 bits reserved for version and variant labelling), sourced from a random number generator or cryptographically secure random source. There is no time value embedded, no mac address leaked, no namespace dependency — just a random label drawn from a pool of 2^122 combinations.
UUID v4 is the right choice when your application needs a unique identifier without requiring any chronological ordering. Common targets include:
- Database entries — users, customers, orders, transactions, files, documents
- Service resources and access credentials for secure communication channels
- Session IDs and secure access tokens for user verification flows
- Event markers, request IDs, job IDs, and correlation IDs in networked applications
- Sample data, mock labels, and placeholder values in testing and development environments
- Distinct message IDs in message queues for reliable processing and tracking
If you simply need a random UUID without worrying about ordering, UUID v4 is usually the best starting point.
UUID v7: A Modern UUID Standard with Timestamp-Ordered Identifiers
UUID v7 is a next-generation uuid format formalised by RFC 9562. It combines a unix epoch value with random data to produce a sortable uuid that supports chronological ordering and creation-time sequencing out of the box — a key advantage over random v4 values when working with indexed database tables.
Because this version encodes a time prefix, newly inserted rows naturally cluster together in a B-tree index, resulting in better index performance and reduced page fragmentation compared to fully random v4 outputs. This makes it a strong choice for database primary keys, indexed values, time-ordered entries, event markers, logs, and any situation where time-ordered ids improve query performance.
One trade-off: the time value embedded in a UUID v7 can reveal the approximate generation moment, which is a minor data exposure consideration in some contexts. If personal data protection is a concern and you do not need time-ordered ids, stick with UUID v4.
| Feature | UUID v4 | UUID v7 |
|---|---|---|
| Primary characteristic | Random label | Time-ordered UUID |
| Random data | 122 bits (all random) | Random data + unix epoch value |
| Time value embedded | No | Yes |
| Sortable by creation time | No (sequential ordering absent) | Yes (chronological ordering) |
| Database indexing performance | Can cause bloated indexes and fragmentation due to fully random values | Better index performance; rows cluster naturally |
| RFC support | RFC 4122 + RFC 9562 | RFC 9562 (2024) |
| Data exposure | No timing information exposed | Approximate generation moment visible |
| Recommended use case | General-purpose IDs, session IDs, access credentials | Database keys, event markers, time-ordered IDs |
Common Ways to Generate Random Version 4 UUIDs Online — and Use Them
Understanding where to apply UUIDs transforms them from an abstract concept into a practical software development tool. Below are the most important use cases, complete with worked examples, covering the decoding and conversion of UUID data as well as generation via web tools.
UUIDs as Database Primary Keys — Unique Identifier in Database Design
One of the most powerful applications of UUIDs is replacing auto-incrementing integers as primary keys in your database schema. Using a UUID as a primary key means your application code can create database entries — and know their IDs — before the insert reaches the database. No round-trip needed, no sequential numbers to coordinate. This ensures database uniqueness across independent nodes without relying on a shared sequence.
UUIDs in databases are supported across all major engines:
- PostgreSQL — native
uuiddata type with storage optimised to 16 bytes - MySQL / MariaDB — store as
CHAR(36)orBINARY(16) - Microsoft SQL Server —
uniqueidentifierdata type - Oracle Database and SQLite — store as text or blob
Example — PostgreSQL table with UUID primary key:
CREATE TABLE orders (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
customer_id UUID NOT NULL,
created_at TIMESTAMPTZ DEFAULT now()
);Compared to integer keys, UUIDs require more storage and produce larger indexes. However, they eliminate ID-guessing attacks (enumeration), prevent conflicting unique keys when merging entries from multiple data sources, and enable decentralised creation across independent nodes without a shared sequence. For write-heavy workloads where index performance matters, consider UUID v7 to benefit from its sequential ordering.
Example — SQL Server table using uniqueidentifier:
CREATE TABLE customers (
customer_id UNIQUEIDENTIFIER PRIMARY KEY DEFAULT NEWID(),
email NVARCHAR(255) NOT NULL
);UUID as a Session Token in Web Development
In web development, assigning a UUID v4 as a session token — a unique label for each user session — protects against predictable session hijacking that sequential numbers would enable. Because each token is independently generated using random bits, an attacker cannot guess valid session values even if they know one valid entry.
Example — attaching a UUID session token to a web application request header:
// Node.js / Express — assign UUID session token on login
const { v4: uuidv4 } = require('uuid');
app.post('/login', (req, res) => {
const sessionToken = uuidv4(); // randomly generated UUID v4
res.setHeader('X-Session-Token', sessionToken);
// Store sessionToken in your session store
res.json({ token: sessionToken });
});This approach is common in security and user verification systems, enabling access authorisation and activity tracking without exposing internal database sequences. UUIDs used as secure access tokens in this way support user management, access control, and audit trails across communication channels.
UUID in Distributed Systems — Merging Records Across Microservices
In distributed systems and networked computing environments — particularly service-oriented architectures — two services may independently create database entries for the same domain entity. If both use auto-incrementing integers, ID clashes are inevitable when rows from multiple services are merged. UUIDs solve this completely.
Example scenario: An order management service and a fulfilment service each create an order entry on-the-fly, independently generated on separate servers. Because both use UUID generation, the unique values produced by each service component are guaranteed to be non-conflicting unique keys when consolidated into a shared data store or message queue. No coordination, no conflicts.
This pattern is fundamental to application architecture at scale — event sourcing, decentralised applications with autonomous software components, correlated event tracking via correlation IDs, and cloud systems that span multiple servers all depend on this property. Each service acts as an independent node, generating distinct labels without ever consulting a central registry. UUIDs enable true scalability and interoperability across your backend.
How This UUID v4 Generator Creates Identifiers Instantly
This online uuid generator — a free uuid v4 generator — creates random UUIDs using a cryptographically secure random source in your browser. No data is sent to a server; generation happens entirely client-side, which means your values are never stored or logged. You can also bulk generate multiple UUIDs in one step — use the bulk UUID generator mode to create in bulk up to the quantity you need, then copy the entire list to your clipboard right away.
The output format is always the canonical UUID format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Example: 550e8400-e29b-41d4-a716-446655440000Key features of this uuid tool:
- Generate UUID v4 (default) — cryptographically random, suitable for all general-purpose ID generation
- Bulk generation mode — produce multiple values at once for batch database seeding, sample data population, or mock labels in development
- One-click copy to clipboard — ✔ copied confirmation appears immediately so you always know your UUID is ready to paste
- Fast, reliable, and built for developers — no sign-up, no rate limits, no UUID storage
This tool defaults to version 4 (version-4) UUIDs. UUID v7 generation is available for workloads requiring time-encoded or sequentially ordered output. Among the available web tools for working with identifiers, it is designed for software developers, IT professionals, and anyone who needs to create UUIDs, validate existing values, or perform decoding and conversion of a UUID to inspect its version and variant fields.
Pro tip — when NOT to use random UUID v4: If your database table has a high-frequency insert workload and relies heavily on clustered indexing, fully random v4 values can cause page splits and oversized indexes because they have no sequential ordering. In these scenarios, switch to UUID v7 for its time-prefixed sequencing, which behaves more like integer keys from an index performance perspective. Your database management and data modelling will benefit significantly under heavy workloads.
UUID Developer Tools, Standards, and Related Resources
UUIDs sit at the intersection of cryptography, distributed systems, and database management. Whether you need to validate an existing value, perform decoding and conversion of its embedded time data (for UUID v7 or UUID v1), or explore the broader ecosystem of web tools, the following resources are useful for software developers and technical professionals working with unique ids at scale.
- URL Encoder / Decoder — essential companion for safely encoding UUID values in query strings and service endpoints. A good encoder ensures your UUID-based resource paths and access credentials survive URL transmission intact.
- JWT Decoder — bearer tokens frequently embed UUIDs as subject (
sub) claims orjti(token ID) fields. Use a decoder to inspect these tokens and extract embedded values for debugging and troubleshooting. - UUID Validator — a uuid validator checks whether a string conforms to the canonical uuid format and identifies its version. Useful for input validation in application code and backend service endpoints.
- Bulk UUID Generator — for sample data generation, migrations of existing users, or populating lookup tables, a bulk generator lets you create hundreds of unique ids in a single operation — an id generator designed for bulk generation at scale.
- Minecraft UUID Generator — Minecraft uses UUIDs extensively for player identity. A dedicated generator produces values compatible with the game's player identification system.
Key specifications and references:
- RFC 9562 (2024) — the current uuid specification defining all uuid variants including UUID v7 and UUID v8. Supersedes RFC 4122 for new implementations.
- RFC 4122 (2005) — the original specification defining the UUID format, uuid versions v1 through v5, and the uuid structure still in use today.
- Language-specific implementations:
System.Guid(.NET / C#),uniqueidentifier(SQL Server),uuiddata type (relational databases),java.util.UUID(Java),uuidnpm package (Node.js),uuidmodule (Python).
For deeper reading, explore a comprehensive uuid versions guide covering uuid specifications, uuids in databases, uuid formatting, and application architecture patterns. Teams scaling to cloud systems and networked computing will find articles covering versioning, data integrity, and schema design decisions particularly valuable. This site also provides a uuid guide and resources suited to both beginners and experienced practitioners, alongside articles on standardisation, data modelling, and the future of uuid specifications in software development.
Frequently Asked Questions
- Which UUID version should I use?
- Version 4 (fully random) is the safe default for most uses -- no information about when or where it was generated leaks from the value itself. Version 7 is increasingly preferred for database primary keys specifically, because its embedded timestamp makes UUIDs sort chronologically and insert more efficiently into B-tree indexes than fully random v4 values. Version 1 is mostly legacy at this point -- it also embeds a timestamp, but in an older, less index-friendly layout.
- Does Version 1 leak my MAC address?
- Not with this tool -- the original UUID v1 spec used your network card's real MAC address as the 'node' component, which is a genuine privacy leak. This generator follows RFC 4122's recommended alternative instead: a cryptographically random node ID with its multicast bit set, which is indistinguishable from a real MAC address to any consumer but reveals nothing about your actual hardware.
- Are Version 7 UUIDs actually sortable?
- Yes -- the first 48 bits are a millisecond-precision Unix timestamp, so UUIDs generated later always sort after ones generated earlier when compared as plain strings or bytes. This is the entire reason v7 exists: to get the database-indexing benefits of a sequential ID while keeping the collision-resistance and decentralized generation of a UUID.
- Can two different UUIDs ever collide?
- For version 4, the chance of any collision among the 122 random bits is astronomically small -- you'd need to generate billions of UUIDs per second for centuries before a collision became likely. Version 7's timestamp reduces the random portion, but it's still generous enough (74 random bits) to make collisions practically impossible for any realistic generation rate.
- Is any of this sent to a server?
- No. Every UUID is generated entirely in your browser using the Web Crypto API's cryptographically secure random number generator -- nothing is transmitted, logged, or stored.