TOOLS WORLD logoTOOLS WORLD

UUID Generator

Create cryptographically secure UUID v4 identifiers, one at a time or up to 100 at once. Options for uppercase and hyphen-free output, with one-click copy.

Click Generate to create cryptographically secure UUID v4 identifiers.

What is a UUID generator?

A UUID generator creates universally unique identifiers - 128-bit values written as 36-character strings like 3f2504e0-4f89-41d3-9a0c-0305e82c3301. Their defining property is that they can be generated anywhere, by anyone, at any time, with no central authority - and still be effectively guaranteed never to collide with any other UUID ever generated. That property makes them the default identifier for distributed systems, database rows, API resources, file names, message IDs, and test data.

This tool generates version 4UUIDs, the random variety defined by RFC 9562 (formerly RFC 4122). It uses your browser's built-in crypto.randomUUID()function, which is backed by the operating system's cryptographically secure random source - the same quality of randomness used for encryption keys. Generation happens entirely on your device: nothing is requested from or sent to a server, and no other visitor can ever see the identifiers you create.

How to use the UUID generator

  1. Choose how many UUIDs you need - anywhere from 1 to 100 per batch. The default of 5 is handy for seeding a few test records.
  2. Pick your formatting options. Enable Uppercase if your target system stores hex in capitals, and disable Include hyphens if you need the compact 32-character form.
  3. Click Generate. The list appears instantly below.
  4. Copy what you need. Each row has its own copy button, and Copy all puts the entire batch on your clipboard, one UUID per line - ready to paste into a spreadsheet, SQL script, or fixture file.
  5. Regenerate freely. Every click produces a completely new, independent batch.

Examples

Standard v4 UUID (lowercase, hyphenated)

9b2f6a1e-8c3d-4f7a-b1e5-2d9c8a7f4e63

Uppercase

9B2F6A1E-8C3D-4F7A-B1E5-2D9C8A7F4E63

Without hyphens

9b2f6a1e8c3d4f7ab1e52d9c8a7f4e63

Note the 4 at the start of the third group - that is the version digit, present in every v4 UUID. The first character of the fourth group is always 8, 9, a, or b, which encodes the variant.

Typical uses

  • Database keys: INSERT INTO orders (id, ...) VALUES ('9b2f6a1e-...', ...)
  • API resources: GET /api/v1/invoices/9b2f6a1e-8c3d-4f7a-b1e5-2d9c8a7f4e63
  • Idempotency keys for payment APIs, so retried requests are not processed twice.
  • Test fixtures - realistic unique IDs for JSON payloads you are building in the JSON Formatter.

How random UUIDs stay unique

A v4 UUID contains 122 bits of randomness, giving about 5.3 × 10³⁶ possible values. The mathematics of the “birthday problem” says you would need to generate around 2.7 quintillion UUIDs before having even a 50% chance of one duplicate. For perspective: generating a million UUIDs per second continuously would take over 80,000 years to get there. This is why systems accept v4 UUIDs as unique without any coordination or duplicate checking - the risk is smaller than the risk of hardware failure corrupting your data.

Choosing a UUID version

Version 4 is the right default, but other versions solve specific problems:

  • v4 (random) - maximum simplicity and privacy; no information leaks from the ID. Use unless you have a reason not to.
  • v7 (time-ordered) - starts with a millisecond timestamp, so IDs sort by creation time. Better B-tree index locality for high-volume database inserts.
  • v5 (name-based) - deterministically derived from a namespace and a name; the same input always yields the same UUID. Useful for stable IDs derived from external keys.
  • v1/v6 (timestamp + node)- legacy formats that can leak the generating machine's MAC address; rarely the right choice today.

Tips

  • Store UUIDs in native uuid database column types where available (PostgreSQL, SQL Server) - they are half the size of a 36-character string column and compare faster.
  • Treat UUIDs as opaque: do not parse meaning out of them or rely on their format beyond validity.
  • Need to validate UUIDs in code? Prototype the pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ in the Regex Tester.
  • Want to share an ID or URL with someone quickly? Turn it into a scannable code with the QR Code Generator.

Frequently asked questions

What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier written as 32 hexadecimal digits in five hyphen-separated groups, like 550e8400-e29b-41d4-a716-446655440000. UUIDs are designed so that anyone can generate them independently, on any machine, without coordination - and the chance of two ever colliding is negligible.
What is the difference between UUID and GUID?
Nothing practical. GUID (Globally Unique Identifier) is Microsoft's name for the same 128-bit format, used throughout Windows and .NET. UUID is the vendor-neutral term standardized in RFC 4122 (now RFC 9562). The identifiers this tool generates are valid as both.
What does version 4 mean?
UUID versions describe how the identifier is built. Version 4 UUIDs are generated almost entirely from random data: 122 of the 128 bits are random, and the remaining 6 encode the version and variant. Other versions exist - v1 and v6 embed a timestamp and node ID, v5 hashes a name, and v7 combines a timestamp with randomness for database-friendly sortability - but v4 is the most widely used general-purpose choice.
Can two generated UUIDs ever be the same?
In theory yes, in practice no. With 122 random bits there are about 5.3 undecillion possible v4 UUIDs. You would need to generate roughly a billion UUIDs per second for about 85 years to reach even a 50% chance of a single collision. Every mainstream system treats v4 UUIDs as unique without checking.
Are these UUIDs cryptographically secure?
Yes. This tool uses the browser's crypto.randomUUID() API, which draws from the operating system's cryptographically secure random number generator. That said, UUIDs should still not be used as secrets or session tokens by themselves - they are identifiers, not credentials.
Should I use UUIDs as database primary keys?
It is a common and reasonable pattern, especially in distributed systems where multiple services insert rows without coordinating. The trade-offs: UUIDs are 128 bits versus 32/64 for integers, and random v4 keys insert at random positions in B-tree indexes, which can hurt write performance at scale. If insert ordering matters, consider UUID v7, which is time-ordered.
Why would I remove the hyphens from a UUID?
Some systems store or transmit UUIDs as a plain 32-character hex string - certain database columns, URL slugs, cache keys, or APIs that reject hyphens. The 'Include hyphens' toggle produces that compact form. The value is identical; only the formatting changes, and most libraries can parse both.

Related tools

More free tools you might find useful alongside the UUID Generator.