UUID generator

Generate v4 UUIDs in bulk, ready to copy.

0 UUID v4
Version 4 (random) UUIDs, generated in your browser with a cryptographically secure random source.

Have feedback or an idea for this tool?

What is a UUID?

A UUID, or universally unique identifier, is a 128-bit value written as 32 hexadecimal digits in five hyphenated groups, used as an identifier that is effectively unique without any central coordination. The version 4 UUID this tool produces fills 122 of those bits with cryptographically random data, so the chance of two colliding is negligible even across separate systems generating them independently. That makes UUIDs ideal as database primary keys, request and trace identifiers, or file and object names where an auto-incrementing number would leak counts or clash between services. Choose how many you need and copy them in bulk. Generation happens in your browser using the system random source. Use the tool to seed test data, to assign identifiers in a distributed system, or to create unpredictable keys that do not reveal how many records exist.

Key facts

  • A UUID (also called a GUID) is a 128-bit identifier written as 32 hexadecimal digits in the 8-4-4-4-12 grouping, for a total of 36 characters.
  • UUID format and version rules are defined by RFC 9562, which replaced the older RFC 4122 in 2024.
  • A UUID version 4 is almost entirely random, with 122 random bits and only the version and variant bits fixed.
  • A UUID version 7 places a Unix millisecond timestamp in its high bits followed by random bits, making values time-ordered and index-friendly.
  • The collision probability of random v4 UUIDs is negligible for real workloads, so they can be treated as unique without checks.

What a UUID (GUID) actually is

A UUID (Universally Unique Identifier), also called a GUID (Globally Unique Identifier) on Microsoft platforms, is a 128-bit value used to label something uniquely without a central authority handing out numbers. The two names refer to the same thing.

It is written as 36 characters: 32 hexadecimal digits in five groups separated by hyphens, in the 8-4-4-4-12 pattern, for example 550e8400-e29b-41d4-a716-446655440000. The hyphens are part of the canonical text form; the raw value is still just 128 bits.

The format and version rules are defined by RFC 9562, which in 2024 replaced the older RFC 4122. Anything you generate here follows that specification, so it is valid input for languages and databases that parse UUIDs.

Hash generator

UUID versions: v4, v1 and v7

Version 4 is the one most developers reach for. Almost all of its bits are random, with a fixed version and variant nibble, so you can mint them anywhere with no coordination. This tool defaults to v4.

Version 1 encodes a 60-bit timestamp plus a node identifier historically derived from the MAC address. It is sortable by creation time but can leak the machine and clock, which is why many teams avoid it.

Version 7 is the newer, recommended choice for database keys. It puts a Unix millisecond timestamp in the high bits followed by random bits, so values are time-ordered and index-friendly like v1, but without exposing hardware. If you are picking a primary-key UUID today, v7 is usually the better default over v1.

Collision probability and why v4 is safe

A v4 UUID has 122 random bits (six are fixed for version and variant). That is roughly 5.3 x 10^36 possible values, so the chance of two independently generated v4 UUIDs colliding is negligible for any real workload.

As a rule of thumb, you would need to generate on the order of a billion UUIDs per second for about 85 years to reach a 50 percent chance of a single collision. In practice you can treat v4 as unique and skip uniqueness checks in application code.

Randomness quality matters: this generator uses the browser's crypto secure random source, not the weaker Math.random, so the entropy behind each value is cryptographically strong.

UUID vs auto-increment IDs in databases

Auto-increment integers are compact, fast to index, and human-readable, but they are guessable, reveal row counts, and require the database to assign them, which complicates sharding, offline creation and merging data from multiple sources.

UUIDs let any client or service generate a key up front without a round-trip, and they stay unique across shards and systems. The trade-off is size (16 bytes vs 4 or 8) and, for random v4, index fragmentation because inserts land in random positions.

Time-ordered v7 is the usual answer to that fragmentation: you keep global uniqueness and client-side generation while inserts stay roughly sequential, which is kinder to B-tree indexes on Postgres or MySQL. When you provision a managed Postgres instance on ServerCake, storing keys as a native uuid type keeps them 16 bytes rather than 36-character text.

Crontab generator

Glossary

UUID / GUID
A UUID (Universally Unique Identifier), also called a GUID on Microsoft platforms, is a 128-bit value used to label something uniquely without a central authority. Both names refer to the same thing.
Canonical 8-4-4-4-12 format
A UUID is written as 36 characters: 32 hexadecimal digits in five hyphen-separated groups of 8, 4, 4, 4 and 12 digits. The hyphens are part of the text form while the raw value stays 128 bits.
UUID version 4
A UUID version 4 is almost entirely random, with 122 random bits and only the version and variant bits fixed. It can be generated anywhere without coordination and is the most common version.
UUID version 7
A UUID version 7 places a Unix millisecond timestamp in its high bits followed by random bits, making values time-ordered and index-friendly. It is the recommended choice for database primary keys.
RFC 9562
RFC 9562 is the 2024 specification that defines UUID format and version rules, replacing the older RFC 4122 and adding versions 6, 7 and 8.
Collision probability
Collision probability is the chance two independently generated UUIDs are identical. For random v4 UUIDs, with about 5.3 x 10^36 possible values, it is negligible for real workloads, so they can be treated as unique.

Questions, answered.

What is the difference between a UUID and a GUID?+

There is no technical difference. GUID (Globally Unique Identifier) is Microsoft's name for the same 128-bit value that the RFC 9562 standard calls a UUID. Both use the 36-character 8-4-4-4-12 hex format, so a GUID from C# or PowerShell and a UUID from Python or Java are fully interchangeable.

What is a UUID v4 and when should I use it?+

A UUID v4 is an identifier whose bits are almost entirely random, with only the version and variant fixed. Use it whenever you need a unique id and do not care about ordering, such as request IDs, API keys or object identifiers. It is the most common version and the default in most libraries.

Should I use UUID v4 or v7 for a database primary key?+

Prefer v7 for primary keys. v4 is fully random, so rows insert in random index positions and can fragment a B-tree index. v7 starts with a millisecond timestamp, so values are time-ordered and insert sequentially while staying globally unique. Both are valid RFC 9562 UUIDs; v7 is simply friendlier to indexes.

How likely is a UUID v4 collision?+

Effectively zero for real workloads. A v4 UUID has 122 random bits, about 5.3 x 10^36 possibilities. You would need to generate roughly a billion per second for about 85 years to reach a 50 percent chance of one collision, so you can safely treat v4 values as unique without checking.

Can I generate UUIDs in bulk?+

Yes. Switch to bulk mode, enter how many you need, and the tool returns a list you can copy in one go. This is handy for seeding database rows, generating test fixtures or pre-allocating IDs for a batch import.

Are these UUIDs generated online on your server?+

No. Every UUID is created locally in your browser using the built-in crypto secure random generator. Nothing you generate is sent to, logged by or stored on a server, so the values are private to you.

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

Python: import uuid then uuid.uuid4(). JavaScript in the browser or Node 19+: crypto.randomUUID(). Java: java.util.UUID.randomUUID(). C#: Guid.NewGuid(). All produce a v4 value. This tool is useful when you want valid UUIDs without running code, or to double-check a format.

Is a UUID always 36 characters long?+

In its standard text form, yes: 32 hexadecimal digits plus 4 hyphens equals 36 characters, in the 8-4-4-4-12 grouping. Some systems store it as a 32-character hyphen-free string, wrap it in braces like a Windows GUID, or keep it as a compact 16-byte binary value, but they all represent the same 128 bits.

Built by the ServerCake team

Cloud that speaks India.

These tools run on ServerCake infrastructure in India. When our cloud opens, you get VMs and managed databases priced in ₹, billed with GST, on India-resident infrastructure. Reserve your spot for early access.

Reserve your spot