Home / Tools / UUID Generator
Free tool · runs in your browser

UUID Generator

Generate random version 4 UUIDs, up to 1,000 at a time. They come from your browser's cryptographic random source — crypto.randomUUID() where available — and are produced on your machine, so no server ever sees an identifier you are about to use.

How it works

What a version 4 UUID is

A UUID is a 128-bit identifier written as 32 hex digits in five hyphen-separated groups: 8-4-4-4-12. Version 4 means the bits are random, apart from six bits that record the version and variant. That leaves 122 random bits.

Because they are random rather than coordinated, two independent systems can generate UUIDs without talking to each other and still not collide — which is the whole point.

How unlikely a collision really is

122 random bits give about 5.3 × 1036 possible values. To reach a 50% chance of a single collision you would need to generate roughly 2.7 × 1018 UUIDs — about 2.6 quintillion. Generating a billion per second, that takes around 85 years.

The caveat is that this holds only with a cryptographically secure random source. A UUID built from Math.random() has far less real entropy and should never be used where uniqueness or unpredictability matters. This tool uses crypto.randomUUID() or crypto.getRandomValues().

Choosing a UUID version

  • v4 (random) — the default and the right choice almost always.
  • v7 (time-ordered) — a newer version with a timestamp prefix, so identifiers sort by creation time. Better for database primary keys, because random v4 keys scatter writes across a B-tree index. Worth knowing about if insert performance matters.
  • v1 — timestamp plus MAC address. Avoid: it leaks the generating machine's hardware address and the creation time.
  • Nil UUID — all zeros, used as an explicit "no value" sentinel.

What people use it for

  • Seeding test data or fixtures that need unique identifiers.
  • Creating a correlation or request ID for tracing across services.
  • Generating a primary key client-side, before a row exists in the database.
  • Naming something that must not collide — a temp file, an S3 object, a queue message.
  • Filling in a config field that wants a unique instance or device identifier.

Nothing is uploaded. This tool runs entirely in JavaScript in your browser. Your input is never sent to a server, never logged and never stored, and no account is required. Once the page has loaded you can go offline and it still works — open your browser's network tab and watch if you'd like to confirm it.

Frequently asked questions

Are these UUIDs cryptographically secure?

They come from crypto.randomUUID() where your browser supports it, otherwise crypto.getRandomValues(). Both are cryptographically secure random sources. A UUID built from Math.random() would not be, and should not be used where unpredictability matters.

Could I ever get a duplicate?

Practically, no. Version 4 UUIDs have 122 random bits, so reaching a 50% chance of one collision needs roughly 2.6 quintillion UUIDs. At a billion per second that is about 85 years.

Should I use a UUID as a database primary key?

You can, but random v4 keys scatter inserts across the index, which hurts write performance and locality on large tables. A time-ordered UUID (version 7) or a separate sequential key avoids that while keeping global uniqueness.

Why avoid version 1 UUIDs?

A v1 UUID embeds the generating machine's MAC address and a timestamp, so it leaks hardware identity and creation time. Use v4 unless you specifically need time ordering, in which case use v7.

Are the UUIDs generated on a server?

No. They are generated in your browser and never transmitted, which matters because an identifier a server has seen is not really yours alone.

Tools that run where your code is

This page does its work in your browser because sending your data to a server to process it is a bad default. Catalase applies the same idea to AI coding: a free, open-source code editor that runs language models on your own machine through Ollama, with no account and no telemetry. Cloud models are there when you choose one, not by default.

Download Catalase freeWhat is Catalase?

Related tools

All 30 free developer tools →