UUID generator

Generate UUIDs for database keys, test data and API requests. Choose version 4 for fully random ids or version 7 for ids that sort by the time they were made, then copy them or download a text file.

Everything runs in your browser using the Web Crypto random number generator, so the ids are never sent anywhere. You can also paste a UUID to check that it’s valid and see its version.

Free with a ShipScroll account.

How to use the UUID Generator

  1. Pick v4 (random) or v7 (time-ordered).
  2. Choose how many you need, up to 1,000.
  3. Press Generate UUIDs, then copy them all or download them as a .txt file.
  4. To check an existing id, paste it under Check a UUID.

v4 or v7: which UUID should you use?

Version 4Version 7
Made from122 random bitsA 48-bit millisecond timestamp, then random bits
Sort orderNoneBy creation time
Database indexesInserts land all over the indexInserts land at the end, like an auto-increment
RevealsNothingRoughly when the id was made
Best forTokens and ids that shouldn’t hint at timingPrimary keys in busy tables

How unique is a UUID?

A version 4 UUID has 122 random bits, so there are about 5.3 × 10³⁶ possible values. For practical purposes, two properly generated ones won’t collide. Version 7 keeps 74 random bits for every millisecond, which is still plenty for ids created at the same moment.

Uniqueness depends on a good random source. This tool uses crypto.getRandomValues, the same cryptographically secure generator browsers use for crypto.randomUUID().

Reading a UUID

  • It’s 32 hexadecimal digits in five groups: 8-4-4-4-12, for example 0192f1a4-7b3e-7c21-9d4a-2f6e8b1c0a57.
  • The first digit of the third group is the version: 4 or 7 here.
  • The first digit of the fourth group is 8, 9, a or b for the standard RFC 9562 variant.
  • In a v7 UUID, the first 12 hex digits are the creation time in milliseconds since 1970.

Questions

What is a UUID?

A Universally Unique Identifier: a 128-bit id written as 32 hex digits, like 123e4567-e89b-12d3-a456-426614174000. It’s defined in RFC 9562 and can be made anywhere without checking a central list.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft’s name for the same 128-bit format.

Are these UUIDs safe to use?

Yes. They’re made in your browser with crypto.getRandomValues, a cryptographically secure source, and never leave your device. Don’t use any UUID as a password or secret key, though: v7 shows when it was made.

Should I use UUIDv7 for database primary keys?

Often, yes. Because v7 ids grow over time, new rows are added at the end of the index, which keeps inserts fast in large tables. Use v4 when the id shouldn’t reveal when it was created.

How do I generate a UUID in code?

In browsers and Node.js, crypto.randomUUID() returns a v4 UUID. In Python, use uuid.uuid4(). For v7, use a library or a database function that supports RFC 9562.

Related tools

Sources

Put your SaaS or AI tool in front of this week’s launches

Link your product, pick your weeks and see a live preview before you pay — or launch for free.