Random UUID Generator

Generate 1 to 1,000 random version 4 UUIDs in your browser. Copy the list for test data, records, or development work.

Enter a whole number from 1 to 1,000.

Generate a List of UUIDs

Choose how many identifiers you need, from 1 to 1,000, then press Generate UUIDs. The page starts with five results and places one UUID on each line. Press Copy results to paste the full list into a test file, spreadsheet, or database import.

Changing the count does not change the list until you press the generate button. Each new list replaces the previous one, so copy any values you want to keep before generating again.

What the UUID Format Means

A UUID is an identifier that can label a record without asking a central service for the next number. Its usual text form has 32 hexadecimal characters arranged in five groups, with hyphens between them. For example, f47ac10b-58cc-4372-a567-0e02b2c3d479 has a 4 at the start of its third group to mark version 4. The first character of its fourth group follows the UUID variant rules.

Version 4 UUIDs are based on random bits. They do not contain a creation date or a sequence number, so sorting them as text does not put records in creation order. If you need time ordering, use a field made for dates or a different identifier format.

What the UUID Versions Mean

The version tells you how a UUID was made. It is the first character of the third group in the usual text format. This generator makes version 4 UUIDs. The table shows what the other versions are for.

VersionHow it is madeTypical use
1Time, a clock sequence, and a node identifier.Older systems that need time-based IDs.
2A DCE Security format defined outside the current UUID standard.Rare legacy systems.
3A namespace and name hashed with MD5.Repeatable IDs for the same name in older systems.
4Random bits, plus fixed version and variant bits.General random IDs. This is what this page generates.
5A namespace and name hashed with SHA-1.Repeatable IDs for the same name; generally preferred over version 3.
6Version 1's time fields rearranged for better sorting.Systems that already work with version 1 IDs.
7A Unix timestamp with random data.New time-ordered IDs, often useful for database records.
8Data arranged by a particular application or specification.Custom formats whose meaning depends on their rules.

See the Version in an Example

  • Version 4: 919108f7-52d1-4320-9bac-f847db4148a8 has a 4 at the start of its third group. Another random pick will usually give a different value.
  • Version 5: 2ed6657d-e927-568b-95e1-2665a8aea6a2 has a 5 there. This example comes from the DNS namespace and the name www.example.com. Using that same namespace and name gives the same UUID again.
  • Version 7: 017f22e2-79b0-7cc3-98c4-dc0c0c07398f has a 7 there. Its first part contains a timestamp, which helps new IDs sort by time.

Choose version 4 when you need an independent random ID. Version 7 is worth considering when you want new IDs to sort roughly by creation time. Versions 3 and 5 are useful when the same namespace and name must produce the same ID every time. Changing the version digit in a UUID does not convert it to another version.

How This Page Creates Them

The generator runs in your browser. It uses crypto.randomUUID() when available. If that method is missing, it uses the browser's crypto.getRandomValues() to create a version 4 UUID with the correct version and variant bits. If neither is available, the page shows an error instead of substituting a weaker random source.

The results are generated when you open the page or press the button. This tool does not look through an existing database to check whether an identifier is already in use.

Useful Places for UUIDs

Try them as IDs for sample customers, orders, files, or events. They are handy when several systems need to create IDs independently and later combine their records. You can also use a short list to test a form that expects UUID text, or a larger list to check an import process.

A well-generated version 4 UUID makes an accidental collision extremely unlikely, but the word “unique” is not a database guarantee. If duplicate IDs would break your application, keep a unique constraint on the stored column and handle a conflict if one occurs.

Generate UUIDs in Your Own Code

This page is useful when you need a list to copy. If your application creates records automatically, generate the UUID where each record is created. That way a new record gets a new ID without someone visiting this page.

PHP

PHP's random_bytes() supplies 16 random bytes. Set the version and variant bits, then format the bytes with hyphens:

function uuidV4(): string {
    $bytes = random_bytes(16);
    $bytes[6] = chr((ord($bytes[6]) & 0x0f) | 0x40);
    $bytes[8] = chr((ord($bytes[8]) & 0x3f) | 0x80);
    $hex = bin2hex($bytes);

    return substr($hex, 0, 8) . '-' . substr($hex, 8, 4) . '-' .
        substr($hex, 12, 4) . '-' . substr($hex, 16, 4) . '-' .
        substr($hex, 20, 12);
}

$id = uuidV4();

Browser JavaScript

On a secure page, modern browsers can create a version 4 UUID directly:

const id = crypto.randomUUID();

Python

Python's standard library has a function for version 4 UUIDs:

import uuid

id = str(uuid.uuid4())

All three examples return the usual UUID text format. Keep a uniqueness check in your database when a repeated ID would cause a problem.

Check Your Application's Requirements

The copy button preserves the hyphens and line breaks. Check whether the place you paste them expects one ID per line, a comma-separated list, or a single ID. Some databases accept UUIDs as text, while others have a UUID column type; use the format your application expects.

Use these values as identifiers. A UUID is not a password, and knowing an ID should not grant access to a record. Keep normal authorization checks in your application even when IDs are hard to guess.

Need raw zeros and ones instead? Use the Random Binary Numbers Generator. For ordinary numbers within a range, use the Random Number Generator.

Frequently Asked Questions

A collision is possible in theory, though very unlikely with properly generated version 4 UUIDs. Use a unique constraint if your stored IDs must never repeat.

No. This page creates random version 4 UUIDs, which do not encode a creation time.

You can if your software accepts the 32 hexadecimal characters without separators. Keep the hyphens when it expects the usual UUID text format.

Recently Updated Pages