A UUID (universally unique identifier) is a 128-bit label that you can generate on any computer, at any time, without checking with a central database, and still be confident nobody else will ever produce the same one. It looks like this:

6f1c2a9e-3b7d-4c58-9e21-0a4f7b3d5c86

The UUID Generator on BISCS India creates version 4 (random) or version 7 (time-ordered) UUIDs, from one to a thousand at a time, using your browser’s cryptographically secure random number generator. It can also tell you the version of any UUID you paste in.

Why use UUIDs instead of 1, 2, 3?

Auto-incrementing numbers are simple, but they have drawbacks once a system grows:

  • They need one source of truth. Two servers, a mobile app working offline, or two merged databases cannot safely invent the next number on their own.
  • They leak information. An invoice URL ending /orders/10452 tells a competitor roughly how many orders you have taken, and invites people to try /orders/10453.
  • They collide when data is combined. Merging records from two branches, both starting at 1, needs renumbering.

UUIDs solve all three. Any device can mint its own, and they will not clash.

Reading a UUID

A UUID is 32 hexadecimal digits split into groups of 8-4-4-4-12. Two positions carry metadata:

6f1c2a9e-3b7d-4c58-9e21-0a4f7b3d5c86
              ^    ^
              |    variant (8, 9, a or b for standard UUIDs)
              version (4 here)

The first digit of the third group is the version. The first digit of the fourth group shows the variant, which for every modern UUID is 8, 9, a or b.

UUID v4 vs UUID v7

Aspect Version 4 Version 7
Contents 122 random bits 48-bit Unix timestamp (ms) + random bits
Sorts by creation time No Yes
Reveals creation time No Yes
Database index friendliness Poor at large scale Good
Standard RFC 4122, now RFC 9562 RFC 9562 (2024)
Best for Public IDs, tokens, general use Primary keys, logs, event IDs

Version 4 is the long-standing default. Every bit apart from the version and variant is random, so v4 UUIDs reveal nothing and are scattered evenly.

Version 7 was standardised in 2024. It starts with the current time in milliseconds, then fills the rest with random bits. As a result, v7 UUIDs generated later sort after those generated earlier. This tool also keeps UUIDs created within the same millisecond in order, using a small counter.

Why ordering matters for databases

Most databases store primary keys in a B-tree index. Random v4 keys land at random positions, so the database keeps splitting and rewriting index pages, which slows inserts and bloats storage once tables reach millions of rows. Time-ordered v7 keys always go at the end, much like an auto-increment number, while keeping the benefits of a UUID.

If you are starting a new table in PostgreSQL, MySQL or SQL Server and want UUID keys, v7 is generally the better pick.

What about UUID v1 and other versions?

You may come across other versions in older systems. Version 1 combines a timestamp with the machine’s network card (MAC) address, which leaks hardware details and is rarely recommended today. Versions 3 and 5 are not random at all: they are created by hashing a namespace and a name, so the same input always gives the same UUID, which is useful when you need a stable ID for something like a URL. Version 6 is a reordered v1 designed to sort by time, but v7 achieves the same goal more simply.

For almost all new work, the choice comes down to v4 or v7, which is why this tool focuses on those two. Its validator still recognises the version number of any standard UUID you paste, so you can identify IDs coming from older code.

How to generate UUIDs with BISCS India

  1. Open the UUID Generator.
  2. Under Version, pick v4 (random) or v7 (time-ordered).
  3. Enter How many you need, from 1 to 1,000.
  4. Choose a format: Uppercase, No hyphens, Braces { } for Microsoft-style GUIDs, or Quotes + commas for pasting straight into code or SQL.
  5. Click Generate, then Copy all or Download the list.

The Quotes + commas option is handy for seeding test data. For example, ten v4 UUIDs ready for a JavaScript array:

const ids = [
  "0c8e4b1f-7d2a-4e93-b6f1-5a3c9d2e7f80",
  "a41f9c3e-2b6d-4f07-8c15-e9d3b7a2c614",
  // ...
];

Checking an existing UUID

Paste any UUID into Validate a UUID. The tool accepts it with or without hyphens, braces, quotes or a urn:uuid: prefix, and tells you whether it is valid and which version it is. For a v7 UUID, it also decodes the embedded timestamp and shows the creation time in IST.

This is useful when you are debugging and want to know whether an ID came from your new v7 code path or an older v4 one, or roughly when a record was created.

Generating UUIDs in code

You rarely need a library any more. Modern browsers and Node.js have a built-in v4 generator:

crypto.randomUUID();   // e.g. "36b8f84d-df4e-4d49-b662-bcde71a8764f"

Python offers uuid.uuid4(), and PostgreSQL has gen_random_uuid(). Support for v7 is newer and varies, so check your language or database version, or generate v7 values with a maintained library.

Common mistakes with UUIDs

  • Using Math.random() to build UUIDs. It is not cryptographically secure and can produce collisions in some environments. Use crypto.randomUUID() or crypto.getRandomValues().
  • Storing UUIDs as 36-character strings in large tables. Where available, use a native UUID or 16-byte binary column type, which is smaller and faster to index.
  • Treating UUIDs as secrets. They are designed to be unique, not unguessable. Use dedicated random tokens for password resets and API keys; the Password Generator can produce long random strings for manual use.
  • Exposing v7 IDs where timing is sensitive. Anyone can read the timestamp.
  • Mixing formats. Uppercase, braces and no-hyphen forms represent the same value, but string comparisons will treat them as different. Normalise to lowercase with hyphens.

Privacy and randomness

Every UUID is generated in your browser with crypto.randomUUID() or crypto.getRandomValues(), the same secure random source browsers use for encryption keys. Nothing is requested from a server and nothing is stored. For other kinds of random values, such as lottery-style draws, try the Random Number Generator, and for fingerprints of data rather than identifiers, the Hash Generator.