UUID Generator

Generate one or more random UUID v4 identifiers, right in your browser.

How to Use the UUID Generator

  1. Enter how many UUIDs you need (1-100).
  2. Click "Generate".
  3. Click "Copy All" to copy every generated UUID to your clipboard, one per line.

Anatomy of a Version 4 UUID

Every UUID this page produces has the same 36-character layout: 32 hexadecimal digits split into groups of 8, 4, 4, 4 and 12 by hyphens. Here is an illustrative value in that format:

3f6c1b2e-9a4d-4c7e-b1f0-5d2a8e6c9b47
  • The first digit of the third group is always 4. This is the version number, and it tells any system reading the value that it was generated randomly.
  • The first digit of the fourth group is always 8, 9, a or b. These bits mark the standard UUID variant defined in RFC 9562, the current UUID specification.
  • The remaining 122 bits are random. No part of the value encodes the time, your computer or your location.

You can use these two fixed positions to sanity-check a value someone claims is a version 4 UUID. If the third group does not start with 4, it is some other version or not a valid UUID at all.

Where the Randomness Comes From

The page calls crypto.randomUUID, the browser's built-in UUID function, which draws on the operating system's secure random number generator. Nothing is requested from a server, so the values are created on your device and are not logged anywhere by this site.

Browsers only offer crypto.randomUUID on secure HTTPS pages and in reasonably recent versions. If it is missing, the page builds the UUID itself from crypto.getRandomValues, which is also cryptographically secure. Only on a very old browser lacking both does it fall back to Math.random, which is fine for test data but should not be relied on for anything security related.

Typical Uses

  • Primary keys for records created on several servers or mobile devices at once, where a central counter is not available to hand out the next number.
  • Idempotency keys for payment and order APIs. The client sends the same UUID with a retried request so the server can recognise a duplicate and avoid charging twice.
  • Seed data and fixtures for testing. Generate up to 100 at once and paste them straight into a SQL script, JSON file or spreadsheet.
  • File names for uploads, so two users uploading photo.jpg at the same moment never overwrite each other.

When a Random UUID Is Not the Right Choice

  • As a password, session token or password-reset link on its own. A UUID is hard to guess, but security tokens are better generated and stored with tools designed for that purpose, with expiry and revocation built in.
  • Where people must read or type the identifier, such as an order number on a bill or a ticket number given over the phone. Thirty-six characters are easy to mistype; a short numeric or alphanumeric code works better.
  • As a clustered index key in a very large, insert-heavy table. Random values land all over the index rather than at the end, which can slow writes. Time-ordered identifiers such as UUID version 7 avoid this.

Frequently Asked Questions

A UUID (Universally Unique Identifier) v4 is a 128-bit randomly generated identifier, formatted as 32 hexadecimal digits in groups (8-4-4-4-12), practically guaranteed to be unique across systems.

They're generated using your browser's cryptographically secure random number generator (crypto.randomUUID), the same standard used by modern JavaScript runtimes for UUID generation.

You can generate up to 100 UUIDs in a single click, shown one per line for easy copying.

In theory yes, in practice no. With 122 random bits, you would need to generate roughly 2.7 billion billion UUIDs before the chance of even one duplicate reached 50%. At a billion UUIDs every second, that takes about 86 years. A unique constraint in your database is still a sensible safety net.

Version 4 is entirely random apart from the version and variant bits. Version 7 starts with a millisecond timestamp followed by random bits, so values sort in the order they were created, which suits database indexes. This page generates version 4 only.
No ratings yet โ€” be the first!
Rate this calculator:

Related Calculators

Was this tool helpful?