Tutorial · UUID Generator · 2 min read

How to Generate UUID v4 Identifiers

Generate one or many random version 4 UUIDs with the browser's cryptographic generator, and learn when a UUID is the right identifier and when it is not.

A version 4 UUID is 122 bits of randomness formatted as 8-4-4-4-12 hex characters. Collisions are practically impossible, which makes them ideal for test fixtures, idempotency keys and identifiers created on a client before a database has assigned one.

What you'll learn

  • Generate single or bulk UUIDs
  • Understand the format and the version digit
  • Know the trade-offs against sequential IDs

Step by step

  1. Choose how many

    Open the UUID Generator and pick a count. One for a quick placeholder, more for a fixture file.

  2. Click Generate

    Each value comes from crypto.randomUUID(), the browser's cryptographically secure generator. The third group always starts with 4, the version.

    41a622e9-6245-4ac9-9d3d-01fe7929f5ce
  3. Copy All

    Values are copied one per line, ready for a seed script or a spreadsheet column.

Open the UUID Generator Runs in your browser. Nothing you paste is uploaded.

Common problems

I need sortable IDs

v4 UUIDs are random and sort poorly as database keys. Consider UUID v7 or ULIDs, which embed a timestamp, when insert order matters.

FAQ

Can two generated UUIDs collide?

The probability is negligible; you would need to generate billions per second for years to expect one.

Are the values sent anywhere?

No. They are generated in your browser and exist only on the page until you copy them.