Home » SEO Tools » UUID Generator

UUID Generator

Generate random UUID version 4 values in your browser, one at a time or in a batch, and copy them for your projects.

Last updated 13 November 2026

Use the tool

UUID version 4 values are random. They are unique in practice, but they are not guaranteed unique by any central registry.

A UUID is a long random identifier used in code, databases and APIs when a simple counting number is not enough. Version 4 UUIDs are random, which makes them useful for IDs that must not clash across systems.

This tool generates UUID version 4 values in your browser, one at a time or in a batch of up to 20, and lets you copy them straight into your project.

How to Use This Tool

  1. Enter how many you need: type a number from 1 to 20.
  2. Click Generate UUIDs: the values appear in the output box.
  3. Click Copy Output: paste them into your code, database or test data.
  4. Generate again for fresh values: each click creates a new random set.

Good Practice Tips

  • Do not use UUIDs as secrets: a UUID is an identifier, not a password or a secure token.
  • Store them as text: most databases store UUIDs as text or as a native UUID type, not as plain numbers.
  • Check your format: some systems want lowercase UUIDs without braces, which is the format this tool outputs.

What Is a UUID

A UUID is a 128 bit identifier written as 32 hex digits split into five groups. The groups hold 8, 4, 4, 4 and 12 digits, joined by hyphens, so the full value is 36 characters long. Here is a typical version 4 UUID:

550e8400-e29b-41d4-a716-446655440000

You can read the version from the first digit of the third group. In this example that digit is 4, which means version 4. The first digit of the fourth group tells you the variant. Here it is a, which is one of 8, 9, a and b, the four values the standard allows.

UUIDs exist because counting numbers break when many systems create IDs at the same time. Two servers can both hand out ID 1042, but two servers will almost never create the same random UUID. That is why UUIDs are used as row IDs in databases, request IDs in APIs, and file names for uploads. The value carries no meaning on its own. It is only a label, and the label is safe to share, log and store.

GUID is the same thing under another name. Microsoft calls this format a GUID, and Windows and .NET tools often show it with braces around it. The braces are a display habit, not a different value. A UUID with braces and the same UUID without braces are the same identifier.

UUID Versions Compared

There are eight numbered versions plus the Nil value. They differ in how the 128 bits are filled. Only version 4 is random all the way through. This tool generates version 4 only. The table below shows each version and whether this tool makes it.

VersionHow it is madeMade by this tool
v1Time and device addressNo
v2DCE Security data, rarely usedNo
v3MD5 hash of a namespace plus a nameNo
v4Random numbersYes
v5SHA-1 hash of a namespace plus a nameNo
v6Time ordered rework of v1No
v7Unix time in milliseconds, then random bitsNo
v8Custom layout for one appNo
NilAll zeros, means no UUIDNo

Versions 3 and 5 are repeatable: the same namespace and name always give the same value, so they are not random and must not be used where a fresh random ID is needed.

UUID v4 vs v7

Version 4 is pure random. Every bit except the version and variant markers comes from a random source, so values have no order and no link to when they were made. Version 7 starts with a Unix timestamp in milliseconds, then fills the rest with random bits. Values made later sort after values made earlier, which keeps database indexes tidy when UUIDs are used as primary keys.

For most uses the difference does not matter. A request ID, a test fixture, or a one off upload name works fine with v4. For a database table that grows fast and is read in key order, v7 is the better pick, because random v4 keys scatter new rows across the index while v7 keys land near the end. This tool generates v4 only, so if your database needs v7, generate it in your database or your code instead of here.

How Likely Is a Collision

A version 4 UUID holds 122 random bits, because 6 of the 128 bits are fixed by the version and variant markers. That gives 2 to the power of 122 possible values, about 5.3×10³⁶. The number is so large that clashes are a theory, not a practical worry.

The birthday maths says you need about 2.71 quintillion UUIDs before the chance of one clash reaches 50 percent. A quintillion is a 1 followed by 18 zeros. If you generated one billion UUIDs every second, you would still need about 86 years to reach that count. For normal use, two UUIDs from this tool will not be the same.

UUIDs as Database Primary Keys

UUIDs make good primary keys when rows are created on many servers at once, because each server can mint IDs without asking a central counter. Three common ways to store them: PostgreSQL has a native uuid type and a gen_random_uuid() function; MySQL has no native type, so teams store the value as text or as 16 raw bytes in a BINARY(16) column; SQL Server calls the same value a uniqueidentifier and fills it with NEWID().

Random v4 keys have one cost. A database index keeps rows in key order, so each new random key lands in a random spot and the index is rewritten often. For a small table this does not matter. For a table with millions of rows written fast, a time ordered key such as v7 keeps new rows together and the index stays fast. If your table is that large, use v7 from your database, not v4 from this page.

Storing a UUID as plain text costs 36 characters per row. Storing the 16 raw bytes costs less than half of that, which matters on a huge table, but it makes the value harder to read in query results. Most teams accept the text cost for the readability.

Generate a UUID in Code

You do not need this page to make a UUID in your own app. Every common language has a one line call. The samples below all make a version 4 value.

Python

import uuid

print(uuid.uuid4())

JavaScript

console.log(crypto.randomUUID());

Java

import java.util.UUID;

UUID id = UUID.randomUUID();
System.out.println(id);

C#

Guid id = Guid.NewGuid();
Console.WriteLine(id);

Go

import "github.com/google/uuid"

id := uuid.New()
fmt.Println(id)

Go needs the google uuid package installed before the sample above will run.

PHP

$data = random_bytes(16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40);
$data[8] = chr(ord($data[8]) & 0x3f | 0x80);
echo vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));

PHP has no built in UUID function, so the sample above builds the value from 16 random bytes and sets the version and variant bits by hand.

PostgreSQL

SELECT gen_random_uuid();

UUID vs GUID vs ULID

UUID and GUID are the same 128 bit format. GUID is only the Microsoft name for it, and the braces that Windows tools add are a display habit. If a .NET doc asks for a GUID, a UUID from this page is the right value, with or without braces.

ULID is a different format. It is 26 characters long, uses a Crockford base32 alphabet, and starts with a timestamp, so ULIDs sort in creation order like v7 UUIDs. ULIDs are shorter and sortable, but they are not UUIDs, and a system that expects a UUID will reject one. This tool does not make ULIDs.

A UUID is also not a hash. A hash is computed from some input, so the same input always gives the same hash. A UUID is random, so the same action twice gives two different values. If you need a hash of text, use the Hash Generator. If you need to read the ID inside a token, use the JWT Decoder.

What This Tool Does and Does Not Do

These are the honest limits of the current tool, so you know before you rely on it:

  • Version 4 only: it makes lowercase UUIDs with hyphens and no braces. There is no uppercase option, no option to drop the hyphens, and no other version.
  • 1 to 20 per click: the count box starts at 5. A number below 1 or above 20 is clamped into that range instead of showing an error.
  • No download: there is no button to save the values as a file. Copy them from the output box instead.
  • No validator: there is no way to paste a UUID you already have and check it on this page.
  • Runs in your browser: nothing you generate is sent to a server or stored anywhere.
  • Web Crypto on modern browsers: on a very old browser without it, the tool falls back to a weaker random source, so values made there are not as strong.
  • Not a secret: a UUID is an identifier, not a password or a secure token. If you need a secret value, use the Password Generator.

Frequently Asked Questions

What is UUID version 4?

Version 4 means the UUID is generated from random numbers, with version and variant bits set to fixed values in the standard format.

Are generated UUIDs guaranteed unique?

No central registry guarantees it, but random version 4 UUIDs are unique in practice for normal use.

Can I use a UUID as a password?

No. A UUID is an identifier, not a secret. Use a proper password or token system for secrets.

Is anything I generate sent to a server?

No. Everything runs in your browser on your own device, so nothing leaves your computer.

What is the difference between UUID v4 and v7?

Version 4 is pure random, so its values have no order. Version 7 starts with a Unix timestamp in milliseconds, so values made later sort after values made earlier, which keeps database indexes tidy. This tool generates version 4 only.

Is a GUID the same as a UUID?

Yes. GUID is the Microsoft name for the same 128 bit format. Windows and .NET tools often show it with braces around it, but the braces are a display habit, not a different value.

How many characters long is a UUID?

36 characters with hyphens: 32 hex digits plus 4 hyphens, in groups of 8, 4, 4, 4 and 12. Without hyphens it is 32 characters.

Can two UUIDs ever be the same?

In theory yes, in practice no for normal use. A version 4 UUID holds 122 random bits, about 5.3×10³⁶ possible values, and you would need about 2.71 quintillion of them before the chance of one clash reaches 50 percent.

How many UUIDs can I generate at once?

One to 20 per click. The count box starts at 5. A number below 1 or above 20 is clamped into that range instead of showing an error.

Can I use generated UUIDs in production?

Yes, for identifiers such as row IDs, request IDs and test data. Do not use them as passwords or secret tokens, because a UUID is an identifier, not a secret.

↑