Skip to the tool
DevToolBench

UUID Generator

Generate UUID v4 and v7 identifiers in bulk.

0 generated

Everything runs in your browser. Nothing you type is sent to a server.

Found a bug in this tool? Report it.

What this tool does

This UUID generator creates universally unique identifiers without a network request. You choose the version, how many you need and how they are formatted, and the list is produced in your browser using the same cryptographic random source a server-side library would use.

Two versions are available. Version 4 is entirely random and is the right choice unless you have a specific reason to order records by their identifier. Version 7 replaces the first 48 bits with a Unix timestamp in milliseconds, so a set of identifiers sorts by creation time.

How to use it

  1. Pick the version you need.
  2. Set how many identifiers to generate — up to 500 at a time.
  3. Choose uppercase or braces if the system you are feeding expects them.
  4. Copy the list, or download it as a plain text file.

Version 4 or version 7 for a database key

This is the decision that actually matters, and it comes down to how your database stores indexes.

Most relational databases keep the primary key in a B-tree. Insert rows with random keys and every insert lands in a different page: the index fragments, pages split, and the working set that has to stay in memory grows with the table. Insert rows with time-ordered keys and every insert lands at the right edge of the tree, which is the same pattern an auto-incrementing integer produces.

That is the argument for version 7. On a table with millions of rows and a steady write rate, the difference in index size and write throughput is measurable — often large enough to matter more than any other schema decision at that scale.

The cost is that a version 7 identifier leaks its creation time. Anyone holding one knows to the millisecond when the record was created, and holding two tells them the interval between them. For an order ID that is harmless. For anything where creation time is itself sensitive, or where sequential-looking identifiers invite enumeration, version 4 is the safer default.

What a UUID is not

A UUID is unique, not unguessable in the sense a secret must be. Version 4 has 122 random bits and is fine as a hard-to-guess token in most contexts, but version 7 exposes half its structure by design, and neither is a substitute for a purpose-built secret with expiry and revocation. Do not use a UUID as a password-reset token, a session identifier, or an API key.

Formats and naming

Most databases and APIs expect the canonical lowercase form with hyphens. Braces are a Windows and .NET convention, where the same value is usually called a GUID — Microsoft's name for the same 128-bit identifier, interchangeable with UUID. Uppercase appears in older systems and in some hardware identifiers.

When in doubt, send the canonical form. Parsers that accept the other variants almost always accept it too, and it is the form every specification uses.

Frequently asked questions

Are these UUIDs safe to use in production?

Yes. They come from your browser's crypto.randomUUID and crypto.getRandomValues, the same cryptographic source a server-side library would use. Nothing is generated on our side, so no one but you ever sees them.

Should I use version 4 or version 7?

Version 4 is fully random and the safest default. Version 7 embeds a millisecond timestamp in its first bytes, so identifiers sort chronologically — that keeps database indexes compact when the UUID is a primary key, at the cost of revealing when the record was created.

Can two UUIDs collide?

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 becomes likely.

Why do some systems call them GUIDs?

GUID is Microsoft's name for the same 128-bit identifier. The formats are interchangeable; only the terminology differs.

Related tools

Updated