Skip to content

UUID Generator

Get a random UUID instantly: version 4 (random) or version 7 (time-ordered), one at a time or up to 1,000 in bulk, in any format. Paste an existing UUID to check its version and timestamp.
  • Generating…

Version 4: 122 random bits from your browser's cryptographic random number generator. Generated on your device; nothing is sent to a server.

Validate and inspect a UUID

What is a UUID?

A UUID (universally unique identifier) is a 128-bit ID written as 32 hex digits in five groups: 8-4-4-4-12, e.g. 550e8400-e29b-41d4-a716-446655440000. Because they're unique without a central counter, apps, databases and APIs use them for IDs that can be created anywhere. The first digit of the third group is the version.

UUID versions

VersionHow it's madeUse it for
v1Timestamp + MAC addressLegacy systems (leaks the machine and time)
v3 / v5Hash (MD5 / SHA-1) of a namespace and nameThe same ID for the same input every time
v4122 random bitsGeneral-purpose IDs; the most common version
v6v1 reordered to sort by timeMigrating from v1
v7Unix milliseconds + random bitsDatabase keys and anything that should sort by creation time

Generate a UUID in code

JavaScript
crypto.randomUUID(); // v4, in browsers and Node.js 19+

UUIDs in APIs

Many APIs use UUIDs as resource IDs, and some ask clients to send one as an idempotency key so a retried request (after a timeout or a 504) isn't processed twice. Generate one per logical operation, not per retry. Browse free APIs by category to see them in action.

Frequently asked questions

Are UUIDs really unique?

For practical purposes, yes. A version 4 UUID has 122 random bits; you'd need to generate about 2.7 quintillion (2.7 × 10^18) of them for a 50% chance of a single duplicate. This generator uses your browser's cryptographically secure random number generator.

Should I use UUID v4 or v7?

Use v7 for database primary keys: it starts with a timestamp, so new IDs sort after old ones, which keeps B-tree indexes compact and inserts fast. Use v4 when IDs shouldn't reveal when they were created.

What's the difference between a UUID and a GUID?

Nothing meaningful: GUID (globally unique identifier) is Microsoft's name for the same 128-bit format. Microsoft tools often show GUIDs in uppercase and sometimes in {braces}, which the generator can do too.

Can I use a UUID as a secret token?

Not as a substitute for a real secret. v4 UUIDs are hard to guess, but other versions aren't random at all, and some code generates v4 with weak randomness. For API keys, session IDs or reset links, use a dedicated random token generator.

How do I get a UUID in my code?

Most languages have one built in: crypto.randomUUID() in JavaScript, uuid.uuid4() in Python, gen_random_uuid() in PostgreSQL, UUID.randomUUID() in Java and Guid.NewGuid() in C#. Examples for each are above.

More free developer tools