SiteBox

UUID Generator

Free Online GUID / UUID v4 Generator

Generate random UUID v4 (GUID) identifiers instantly. Choose how many to generate and customize the output format.

How to Use the UUID Generator

1. Choose Your Options

Select the number of UUIDs to generate (1, 5, 10, or 50), pick lowercase or uppercase, and optionally remove the hyphens.

2. Click Generate

Each UUID v4 is generated locally in your browser using a cryptographically secure random source.

3. Copy Your UUIDs

Click the copy icon next to any UUID to copy it individually, or use Copy All to copy the entire list to your clipboard.

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information across computer systems. A UUID v4 is randomly generated, making it ideal for database primary keys, session tokens, request IDs, and any scenario where you need an identifier that is practically guaranteed to be unique.

UUIDs are also called GUIDs (Globally Unique Identifiers), a term popularized by Microsoft. The standard v4 format contains 36 characters, including four hyphens, and uses the hexadecimal digits 0-9 and a-f. Because the number of possible combinations is astronomically large (2122 for version 4), collisions are effectively impossible.

Anatomy of a Version 4 UUID

Here is a UUID this page might generate:

f47ac10b-58cc-4372-a567-0e02b2c3d479

It is 128 bits written as 32 hexadecimal digits in five groups of 8-4-4-4-12. Two positions are not random, and you can spot them in every v4 UUID:

  • The first digit of the third group is always 4. That is the version.
  • The first digit of the fourth group is always 8, 9, a or b. That is the variant, marking the layout defined in RFC 9562 (which replaced RFC 4122 in 2024).

The remaining 122 bits are random. If you ever see something like …-1xxx-… in that position, it is a version 1 UUID based on time and hardware address, not a random one.

Can Two UUIDs Ever Collide?

With 2122 possible values (about 5.3 × 1036), the birthday-problem maths says you would need to generate roughly 2.7 × 1018 v4 UUIDs before there is a 50% chance that any two of them match. Put differently, a system creating a billion IDs every second would need around 85 years to reach that point. For practical purposes, if the random source is good, collisions don't happen.

"If the random source is good" is the important clause. This page uses crypto.randomUUID() where the browser supports it, and otherwise fills 16 bytes with crypto.getRandomValues(). Both draw on the operating system's cryptographically secure generator. Only on a very old browser without the Web Crypto API does it fall back to Math.random(), which is not suitable for anything security-related.

Where Developers Use Them

Seeding a test database

You need 50 customer rows with stable primary keys for fixtures. Set quantity to 50, generate, click Copy All, and paste the list into your seed script. Every ID is unique without a round trip to the database.

Idempotency keys

Payment APIs such as Stripe accept an Idempotency-Key header so a retried request isn't charged twice. A fresh v4 UUID per logical operation is the usual value.

Correlation IDs in logs

Attach one UUID to a request when it enters your system and log it in every service it passes through. Searching the logs for that one value reconstructs the whole journey.

Formatting Choices and Their Pitfalls

OptionExampleWhen it fits
Lowercase (default)f47ac10b-58cc-4372-a567-0e02b2c3d479The canonical form recommended by the RFC; what most libraries output
UppercaseF47AC10B-58CC-4372-A567-0E02B2C3D479Windows registry and some .NET tooling display GUIDs this way
No hyphensf47ac10b58cc4372a5670e02b2c3d479Filenames, compact keys, systems that store 32-character hex

Comparisons are where mixed formats bite. In PostgreSQL's native uuid type case and hyphens don't matter, but a plain VARCHAR column compares strings literally, so F47A… and f47a… are different values. Pick one format per system and normalise on input.

Random UUIDs also make poor clustered primary keys in some databases (MySQL InnoDB, SQL Server), because inserts land at random places in the index and fragment it. If insert performance matters at scale, look at time-ordered UUID version 7, which this generator does not produce.

Related Tools

A UUID is an identifier, not a secret. For a token that must be hard to guess, such as an API key or password, use the Password Generator. To derive a repeatable ID from existing data (the same input always giving the same output), hash it with the Hash Generator instead. Browse all developer tools.

Frequently Asked Questions

What is the difference between a UUID and a GUID?

They are the same thing. GUID is Microsoft's name for a UUID. The format and the 128-bit size are identical.

Are the UUIDs generated here truly random?

Yes, in modern browsers they come from the Web Crypto API, which uses the operating system's cryptographically secure random number generator.

Is it safe to use a UUID as a session token or API key?

A v4 UUID from a secure source is hard to guess, but dedicated secrets are usually longer and use a wider character set. Prefer a purpose-built token generator for authentication.

Should I store UUIDs with or without hyphens?

Use a native UUID column type if your database has one. Otherwise pick one format, usually lowercase with hyphens, and normalise everything to it.

Can this tool generate UUID v1 or v7?

No. It generates version 4 random UUIDs only.