UUID Generator
Generate v4, v7, v1, v3 and v5 UUIDs — one or a thousand at once — and inspect any UUID.
UUID Generator - Create v4, v7, v5 and v1 UUIDs Online
A UUID is a 128-bit identifier that two systems can create independently and still be confident they will never collide. This free generator produces version 4 (random), version 7 (time-ordered), version 1 (timestamp and node) and versions 3 and 5 (derived from a name) - one at a time or up to a thousand at once, as plain lines, a JSON array, CSV or SQL values. Paste any identifier into the inspector and it reports the version and variant, and decodes the timestamp that a v1 or v7 value carries.
UUIDs are also called GUIDs, mainly in the Microsoft ecosystem. The two terms describe the same 36-character string: 32 hexadecimal digits arranged in five groups separated by hyphens, for example f47ac10b-58cc-4372-a567-0e02b2c3d479.
Why use a UUID instead of an auto-increment ID?
A sequential database ID has to be assigned by one authority, which means a client cannot know an object's identifier until the server replies. UUIDs remove that dependency. A mobile app can create records offline, a queue worker can reference a row before it is written, and two datacentres can merge without renumbering anything. Sequential IDs also leak information: /invoice/1042 tells a competitor roughly how many invoices you have issued, while a UUID tells them nothing.
The UUID versions you will meet
| Version | How it is built | Typical use |
|---|---|---|
| v1 | Timestamp plus a node identifier | Legacy systems; here the node is random bytes, never your MAC address |
| v3 / v5 | MD5 or SHA-1 hash of a namespace plus a name | Deterministic IDs: the same namespace and name always produce the same UUID |
| v4 | 122 random bits | The general-purpose default when you simply need a unique value |
| v7 | 48-bit Unix timestamp plus randomness | Database keys: sorts by creation time, so the index stays tidy |
How to generate and validate UUIDs here
- Choose the version: v4 for general use, v7 for database keys, v5 or v3 to derive an ID from a name, v1 for legacy formats.
- Set the count - anything from one to a thousand.
- Pick the output shape: one per line, a JSON array, CSV, or SQL values ready to paste into an INSERT.
- Tick uppercase, no hyphens, braces or the
urn:uuid:prefix if the system you are feeding expects them, then Copy or Download. - Paste any identifier into Inspect a UUID on the right to check it and decode what it carries.
Which version should you pick?
Take v4 unless you have a reason not to: it is random, carries no metadata and is what almost every library defaults to. Take v7 when the identifier becomes a primary key in a busy table - the millisecond timestamp comes first, so new rows land at the end of the index instead of scattering through it, and the values sort chronologically as plain strings. Take v5 when the same input must always yield the same identifier, such as a stable ID derived from a URL or a tenant name; v3 is the older MD5 variant of that idea, worth using only for compatibility. v1 is mostly for reading old data: it encodes the creation time and, traditionally, the machine's MAC address.
Batches are monotonic here: generate a thousand v7 UUIDs in one click and they still sort in the order they were made, because the twelve bits after the version field hold a counter rather than noise. The nil UUID - all zeroes - is in the menu too, since it is the conventional placeholder for no value.
What the inspector tells you
Paste any identifier into the Inspect a UUID pane on the right, with or without hyphens, braces or a urn:uuid: prefix. The inspector confirms the format, names the version and the variant, and shows the canonical form and the raw hex. For a v1 or v7 value it decodes the embedded timestamp into a readable UTC date, which is often the quickest way to tell when a record was created. For v1 it also prints the node bytes and says whether the multicast bit marks them as random or as a real MAC address. A well-formed value is marked Valid UUID, and each version adds a line of its own: Sortable for v7, Entropy for v4 (122 random bits and nothing else), and Derived from for v3 and v5, because the same namespace and name always give the same UUID. A variant shown as NCS or reserved for the future usually means the value was never generated as a standard UUID, even though it has the right shape.
Where UUIDs are used every day
- Primary keys in distributed databases and in systems that sync between devices.
- Correlation and request IDs that follow a single call through several microservices and log files.
- Idempotency keys that let a payment or an API call be retried safely without double execution.
- Filenames for uploads, so two users can upload
photo.jpgwithout overwriting each other. - Session, device and installation identifiers in mobile and desktop applications.
- Message and event IDs in queues, webhooks and event-sourced systems.
Can two UUIDs ever be the same?
In theory yes, in practice no. A version 4 UUID has 122 random bits, which is about 5.3 undecillion possible values. You would need to generate billions of UUIDs per second for a century before a collision became likely - far outside anything an application does. The real risk is not mathematical: it is generating UUIDs with a weak random source. This tool uses crypto.getRandomValues, the browser's cryptographically secure generator, rather than Math.random.
Practical notes before you commit to UUIDs
- Storage: 16 bytes as binary, 36 characters as text. Use a native UUID or BINARY(16) column rather than VARCHAR where you can.
- Indexing: random v4 values scatter across a B-tree and can fragment large tables. Consider v7 or a separate sequential key for hot tables.
- Case: UUIDs are conventionally lowercase, but comparisons should be case-insensitive because some systems emit uppercase.
- Braces: Windows tooling often wraps GUIDs in
{...}. Strip them before storing. - URLs: a UUID is URL-safe as it stands, no percent-encoding needed.
Generated in your browser
Every value is created locally and never sent anywhere, so identifiers you generate for internal systems stay private and are yours alone.
Generate a UUID in code: JavaScript, Python, Java, C#, SQL and the shell
When you need identifiers inside a program rather than from a web page, every mainstream platform ships a generator. The calls below all produce a random version 4 UUID unless marked otherwise.
| Platform | One-liner |
|---|---|
| JavaScript / Node.js | crypto.randomUUID() |
| Python | import uuid; uuid.uuid4() |
| Java | UUID.randomUUID() |
| C# / .NET | Guid.NewGuid(), or Guid.CreateVersion7() on .NET 9 for a v7 |
| PostgreSQL | gen_random_uuid(), or uuidv7() from PostgreSQL 18 |
| MySQL | UUID() - note that this returns a time-based v1 |
| Linux / macOS shell | uuidgen |
| PowerShell | [guid]::NewGuid() |
Looking for a Minecraft UUID? Those are assigned by Mojang to each account and are looked up by player name, not generated - this tool creates new random identifiers for your own systems.
Related tools
Identifiers travel with other values. Create secrets with the password generator, compute fingerprints with the hash generator, read a token subject claim with the JWT decoder, and check timestamps with the Unix timestamp converter.