elefcode

UUID / ID Generator

UUID v1/v4/v5/v7 · ULID · NanoID — generated client-side

Random (RFC 4122) — most common

0 IDs

Advertisement

Guide

About the UUID Generator

A UUID (Universally Unique Identifier), also called a GUID, is a 128-bit value written as 36 characters — 32 hexadecimal digits in five groups separated by hyphens, like f47ac10b-58cc-4372-a567-0e02b2c3d479. UUIDs let independent systems generate identifiers that are effectively guaranteed never to collide, without coordinating through a central database. That makes them ideal for primary keys, request IDs, file names, and distributed systems.

This generator produces UUID v4 and v7using your browser's cryptographically secure random number generator, and can create many at once for seeding databases or tests.

UUID v4 vs. v7 — which should I use?

v4 is fully random and the most widely used. Its downside is that random IDs scatter across a database index, which can hurt insert performance at scale. v7is newer and embeds a Unix millisecond timestamp in its leading bits, so freshly generated v7 UUIDs sort roughly in creation order. That makes them far friendlier as database primary keys while still being globally unique. If you're choosing today and your database supports it, v7 is often the better default; v4 remains a safe, universal choice.

How unique are they, really?

A v4 UUID has 122 random bits. The number of them you'd need to generate before a collision becomes likely is so large that, in practice, you can treat them as unique forever. You do not need to check for duplicates in normal applications.

How to use it

  1. 1Choose the version — v4 for pure randomness or v7 for time-ordered IDs.
  2. 2Set how many you want to generate.
  3. 3Pick uppercase or lowercase formatting.
  4. 4Copy a single UUID, or copy them all at once.

Frequently asked questions

What is the difference between a UUID and a GUID?

They are the same thing. GUID (Globally Unique Identifier) is Microsoft's term; UUID is the standardized name. The format and guarantees are identical.

Are these UUIDs cryptographically secure?

The randomness comes from the browser's crypto.getRandomValues, which is a cryptographically secure source. That said, UUIDs are identifiers, not secrets — don't use one as a password or token on its own.

Should I use UUID v4 or v7 for a database primary key?

v7 is usually better for primary keys because its time-ordered layout keeps index inserts sequential, avoiding the fragmentation random v4 keys can cause. Use v4 when you specifically want unordered, opaque IDs.

Can I generate UUIDs in bulk?

Yes. Set the count and generate hundreds at once, then copy them all — handy for seeding test data or databases.

Is generation done offline?

Yes. Everything runs in your browser with no network calls, so you can generate UUIDs even offline.

Related tools