Developer Tools

UUID Generator

A UUID is a 128-bit identifier that can be generated independently anywhere and still be unique, which is why they are used for database keys and request ids. This generator uses the browser's cryptographic random source rather than Math.random, and offers version 7 alongside version 4 — v7 embeds a timestamp so the identifiers sort by creation time, which makes a dramatic difference to database index performance.

Runs entirely in your browser — nothing you paste is uploaded.

Version

122 random bits. The usual choice.

How many
Format
  • 744c0fcd-2a54-4516-b2b7-e519c0f1aa1b
  • f7c3c818-2e6a-4dcb-ae5e-9bb58af88bd9
  • 7a4ad833-4573-448b-af68-365e6cc3b33b
  • 853a5d0d-ed28-4268-8f3a-5ea5a7b56106
  • 10e42ae1-a0a1-4859-93a4-10e7437fddd1
  • 90263c34-9dd3-46f1-ba3c-46f12cbe2c01
  • 22b8cad2-2452-4df4-8060-5774f105065a
  • ab6aa7b5-2bef-4240-857b-e61a8d0b590d
  • aeed96e2-097f-4cdf-8892-ab81db698fab
  • a468dba6-9b96-47aa-a439-560c5f3106a3

How to

How to use the UUID Generator

  1. 1

    Pick a version

    Version 4 is entirely random and the usual choice. Version 7 starts with a millisecond timestamp, so a batch sorts in creation order — better for database keys.

  2. 2

    Choose how many

    Generate one or up to a thousand at once. A fresh batch is produced each time, and none of it is stored anywhere.

  3. 3

    Set the format

    Standard lowercase with hyphens suits most uses. Uppercase, braces and hyphen-free variants are available for systems that expect them.

  4. 4

    Copy or inspect

    Copy the list, download it, or paste any existing UUID into the inspector to see which version and variant it is.

Examples

UUID Generator examples

A version 4 UUID

Input
Generate, v4
Output
f47ac10b-58cc-4372-a567-0e02b2c3d479

122 of the 128 bits are random. The 4 at the start of the third group marks the version, and the first character of the fourth group marks the variant.

A batch of version 7 UUIDs

Input
Generate 3, v7
Output
Three ids that sort in creation order

The first 48 bits are a millisecond timestamp, so the ids increase over time. As a primary key this keeps database inserts at the end of the index instead of scattering them.

Inspecting an unknown id

Input
f47ac10b-58cc-4372-a567-0e02b2c3d479
Output
Version 4, RFC 4122 variant

The inspector reads the version and variant bits, which tells you how the id was generated and therefore whether it carries a timestamp.

Why use it

What the UUID Generator gives you

Proper randomness

Values come from the platform's cryptographic random source. Math.random is not used anywhere, since it is not designed to be unpredictable and can repeat across tabs.

Sortable identifiers when you need them

Version 7 gives you uniqueness without the index fragmentation that random keys cause on a large table.

Bulk generation

Produce a thousand at once for seed data or load testing, then copy or download the whole list.

Nothing is recorded

Identifiers are generated in your browser and never sent or stored, so none of them can have been issued to anyone else.

Good to know

UUID Generator limitations

  • A version 7 UUID reveals when it was created, which is a small information leak if the identifier is public.
  • UUIDs are 36 characters as text, which makes them heavier database keys than an integer.
  • Uniqueness is probabilistic rather than guaranteed, though the odds of a v4 collision are far beyond negligible.
  • Versions 1, 3 and 5 are not offered — v1 leaks the machine's MAC address and the name-based versions need an input namespace.

Summary

UUID Generator in short

  • Version 4 is random; version 7 sorts by creation time and is better as a database key.
  • Randomness comes from the cryptographic source, never Math.random.
  • A v4 collision is so unlikely it can be ignored in practice.
  • Version 7 embeds a timestamp, so it reveals when the id was made.
  • Generation happens in your browser and nothing is stored.

FAQ

UUID Generator questions

Could two generated UUIDs ever be the same?

In principle yes, in practice no. A version 4 UUID has 122 random bits, so you would need to generate billions per second for decades before a collision became likely. It is safe to treat them as unique.

Should I use version 4 or version 7?

Version 7 for anything that becomes a database primary key, because sorted keys keep inserts at the end of the index rather than scattering writes across it. Version 4 for public identifiers, since v7 discloses its creation time.

Why does it matter which random source is used?

Math.random is fast but predictable — its output can be reconstructed from a few samples, and two tabs opened together can produce the same sequence. Anything used as an identifier or token needs the cryptographic source instead.

How can I tell which version a UUID is?

The first character of the third group is the version number, so a 4 there means version 4 and a 7 means version 7. The first character of the fourth group encodes the variant, and is normally 8, 9, a or b.

Are UUIDs a good primary key?

They let you generate ids without a round trip to the database, which is valuable in distributed systems. The cost is size and, for random versions, index fragmentation — which is precisely the problem version 7 was designed to solve.

Why are versions 1, 3 and 5 not offered?

Version 1 embeds the machine's MAC address and is a privacy problem. Versions 3 and 5 are deterministic hashes of a name within a namespace, so they are not generated at random and need inputs this tool does not ask for.

Is a GUID the same thing as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit identifier. The only practical difference is presentation — Microsoft tooling often wraps them in braces and uses uppercase, both of which this tool can produce.

Can a UUID be used as a security token?

A version 4 UUID is random enough to be unguessable, so it works as a one-off link token. Version 7 is not suitable, because most of its leading bits are a predictable timestamp rather than random.

Are generated UUIDs stored or logged anywhere?

No. They are produced in your browser and exist only on your screen until you copy them. Nothing is transmitted, so no identifier generated here has been seen by anyone else.

Discover

Related developer tools