Random UUID Generator

Generates 1 to 10 version 4 UUIDs per press, each with a copy button, using the standard uuid library.

The Random UUID Generator creates version 4 UUIDs, one to ten at a time, each on its own card with a copy button. A v4 UUID is a 36-character identifier such as 9b2e4f1a-7c3d-4e8b-a5f6-0d1c2b3a4e5f: 32 hex digits in five groups, with 122 of its 128 bits filled from a random source. We use the standard uuid npm package to generate them, the same library most Node and browser projects already depend on, so what you get here is exactly what uuidv4() would give you in your own code.

How to use it

Enter a number from 1 to 10 and press the button. Each UUID appears on a card; click the copy icon to put that one on your clipboard. Press again for a new batch. There are no other options: the tool always produces version 4, lowercase, with hyphens, which is the form nearly every database, API and config file expects.

Anatomy of a version 4 UUID

Take the example above and split it at the hyphens: 8-4-4-4-12 hex digits. Two positions are fixed by the standard (RFC 4122, now RFC 9562) and everything else is random.

PositionExampleMeaning
Group 19b2e4f1a32 random bits
Group 27c3d16 random bits
Group 3, first digit4e8bVersion. Always 4 for a random UUID
Group 4, first digita5f6Variant. Always 8, 9, a or b
Group 50d1c2b3a4e5f48 random bits

So you can tell a v4 UUID by eye: the third group starts with 4 and the fourth group starts with 8, 9, a or b. The remaining 122 bits are random, which gives 5.3 × 1036 possible values. You would need to generate about 2.7 × 1018 UUIDs (a billion per second for 85 years) before the odds of a single collision reached 50 percent. That is why systems can mint them independently, on any machine, without a central counter.

Where UUIDs are used

  • Primary keys in databases where rows are created on many servers or offline devices and merged later. Postgres has a native uuid type; MySQL stores them as CHAR(36) or BINARY(16).
  • Public identifiers in URLs and APIs, where a sequential integer would let anyone guess how many orders you have or enumerate other users' records.
  • Correlation and request IDs that follow one request through logs across several services.
  • File and asset names for uploads, so two users uploading photo.jpg never collide.
  • Idempotency keys for payment and messaging APIs, so a retried request is recognized as the same one.

Version 4 versus the others

Version 1 UUIDs embed a timestamp and the machine's MAC address, which makes them sortable but leaks where and when they were made. Versions 3 and 5 hash a name into a UUID, so the same input always gives the same ID. Version 7, added in 2024, puts a Unix timestamp in the first 48 bits and random data in the rest, so it sorts by creation time while staying unpredictable; it is becoming the default for new database keys. Version 4 is pure randomness and remains the right choice whenever you do not need ordering and want nothing inferable from the ID. This tool makes v4 only.

Related developer tools

If you need other kinds of identifiers for test data, the Random API Key Generator and Random String Generator produce tokens of a length you choose, the Random MAC Address Generator and Random IP Generator cover network fixtures, and the Encryption Key Generator is the one to use when the value must be a secret. All of them are under all developer & test data tools.

Frequently asked questions

Which UUID version does this generate?

Version 4 only. You can confirm it on any result: the third group of digits starts with 4 and the fourth starts with 8, 9, a or b.

Are these UUIDs guaranteed unique?

Not guaranteed, but the chance of two matching is so small it is treated as zero in practice: 122 random bits give 5.3 × 10^36 possibilities, and you would need billions per second for decades before a collision became likely.

Can I generate more than 10 at once?

Not on this page. The input accepts 1 to 10 per press. Press repeatedly if you need more, or call uuidv4() in a loop in your own code.

Is a UUID the same as a GUID?

Yes. GUID is Microsoft's name for the same 128-bit identifier. The format, including the version and variant digits, is identical; Windows tools sometimes display them in braces or uppercase.

Can I use these as secrets or session tokens?

Version 4 UUIDs from the uuid library use the browser's cryptographic random source, so they are unpredictable, but they are identifiers, not keys. For anything that must stay secret, use a dedicated key generator with a longer random value.