Developer UUID Generator

UUID Generator

Generate cryptographically random v4 UUIDs, one at a time or in bulk.

  • fcd203c0-7155-472c-9cbd-d7fcc76ad7df
  • 46788a7c-26f1-4d54-9222-e2b204de008c
  • 84f9aa2c-87e4-42f6-9ee1-cae4f177e26d
  • dd177625-829b-480a-b175-def9f23adf68
  • b9bcc092-72a8-4e3c-8bcd-65ff145d81d9

How to use this tool

Choose how many UUIDs you need, from 1 to 50, and generate. Copy one with its own button, or use Copy all to get the whole batch with one UUID per line, ready to paste into a spreadsheet column or a seed file. They come from the browser's crypto.randomUUID(), the same cryptographic random source used for keys.

Reading a version 4 UUID

In f47ac10b-58cc-4372-a567-0e02b2c3d479, two digits are fixed and the other 122 bits are random:

  • The first digit of the third group is always 4, the version.
  • The first digit of the fourth group is always 8, 9, a or b, the variant that marks a standard RFC 9562 UUID.

So every UUID from this page matches ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$, a check worth adding when your code accepts UUIDs from outside. A value with a different digit in either position came from another UUID version, or isn't a UUID.

Storing them

  • PostgreSQL has a uuid column type that stores the 16 bytes and accepts the text form in upper or lower case.
  • MySQL has no UUID type: CHAR(36) stores the text, 36 bytes per value, while BINARY(16) with UUID_TO_BIN() stores the same value in 16.
  • Compare UUIDs case-insensitively or store them in lower case. This page, crypto.randomUUID(), Python's uuid module and Java's UUID class all write lower case, as RFC 9562 specifies, but Windows tools such as the Registry Editor show GUIDs in upper case, inside braces.

Frequently Asked Questions

How likely is a UUID collision — could two ever be the same?

Possible in principle, negligible in practice. A v4 UUID has 122 random bits, so there are about 5.3 × 10^36 possible values. By the birthday bound, a set of one billion UUIDs has roughly a 1 in 10^19 chance of containing any duplicate. You would need about 2.7 × 10^18 of them for a 50% chance, which at a billion a second takes around 86 years. The real risk is a weak random source, not the arithmetic: this page uses the browser's cryptographic generator.

Can I use these as passwords or secret tokens?

They are generated from a cryptographic source, but UUIDs are made to be identifiers, and they tend to end up in URLs, logs and support tickets. For a secret, generate a token meant to stay secret, such as 32 random bytes from your language's secure random function, and store only its hash.

Why does this page only make version 4?

Because crypto.randomUUID() produces version 4, and it is the right default for most IDs. If you need IDs that sort by creation time, for example as a database primary key, version 7 puts a timestamp in the first 48 bits; the UUID guide on this site explains the difference.

Related Tools

Related Blog Posts