UUID v4 Generator

Need a unique identifier for a database row, test fixture, request id or API key prefix? Generate cryptographically random UUIDs in bulk and copy them in the format your code expects.

What is a UUID?

A Universally Unique Identifier is a 128-bit value written as 32 hexadecimal digits in five groups: 8-4-4-4-12, for example 3f2504e0-4f89-41d3-9a0c-0305e82c3301. Microsoft calls the same thing a GUID. Because the space of possible values is astronomically large (2122 for v4), you can generate ids on many machines at once without coordination and without realistic risk of collision.

UUID versions in brief

v4 is purely random and is what this tool generates — the right default for almost every application. v1 embeds a timestamp and MAC address (leaks information, mostly obsolete). v3/v5 are deterministic hashes of a name within a namespace, useful when the same input must always map to the same id. v7, standardised in 2024, is time-ordered random, which keeps database indexes compact; use it if your database and libraries support it.

The version is visible in the first character of the third group (4 for v4) and the variant in the first character of the fourth group (8, 9, a or b).

Randomness quality

The generator uses crypto.getRandomValues() — the browser's cryptographically secure random source — rather than Math.random(). That makes the output suitable for session ids and tokens, not just test data.

How to use it

  1. Choose how many UUIDs you want (1–100).
  2. Pick a format: standard (lowercase with dashes), uppercase with dashes, or no dashes (32 hex characters).
  3. Click Generate, then press Copy All to copy the whole list, one UUID per line.

Sample output

Five freshly generated v4 UUIDs look like this:

9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed
6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b
7c9e6679-7425-40de-944b-e07fc1f90ae7
16fd2706-8baf-433b-82eb-8c7fada847da

Notice the 4 at the start of the third group in every value — the version marker.

Common use cases

Options and a quick check

The tool has two settings: Count (1 to 100; larger numbers are capped at 100) and Format, which is either lowercase with dashes, uppercase with dashes, or no dashes (32 hex characters). Every value is a version 4 UUID, and there is no option for v1, v5 or v7. The Copy All button copies the whole list, one UUID per line.

To confirm a value is a proper v4 UUID, test it against ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ (lowercase, with dashes). Mixing cases is a common bug: databases and string comparisons treat A1B2… and a1b2… as different, so pick one format and stick to it.

Frequently asked questions

Is a UUID the same as a GUID?

Yes. GUID (globally unique identifier) is the name Microsoft uses for the same 128-bit identifier, so a version 4 UUID from this generator works anywhere a GUID is expected.

Are the UUIDs truly unique?

Statistically yes. With 2^122 possible v4 values you would need to generate about 2.7 quintillion ids to reach a 50% chance of a single duplicate.

Should I use UUIDs as database primary keys?

They work well, especially in distributed systems. Be aware that random v4 keys fragment B-tree indexes; for very high insert rates consider UUID v7 or a ULID, which are time-ordered.

Are these generated on a server and reused?

No. Each UUID is generated in your browser with a cryptographically secure random generator and is never stored or transmitted.

Can I generate uppercase GUIDs for .NET or SQL Server?

Yes — switch the format to uppercase and copy the result. If a tool or registry file expects braces around the GUID, add them in your editor, since the generator does not offer a braces format.

Can I generate UUIDs with braces or other versions?

No. The Format list offers lowercase, uppercase and no-dashes output, and every value is v4. Add braces in your editor if a tool such as .NET or a registry file expects them.

Related tools

Explore all developer tools →