UUID Generator

Generate v4, v7 and v1 UUIDs in bulk, and inspect any UUID to see its version and creation time.

What It Does

This tool generates UUIDs in the version you need and explains what that choice costs you. Version 4 is pure randomness; version 7 puts a timestamp in the leading bits so identifiers sort by creation time, which is what stops a UUID primary key wrecking database write performance; version 1 is the legacy format that embeds a machine identifier. It also works in reverse: paste any UUID and it will tell you its version, its variant and, where the format carries one, exactly when it was created.

When to Use It

  • You need identifiers for database rows and want to pick between v4 and v7 knowingly.
  • You are seeding test data and need a few hundred unique identifiers as JSON or CSV.
  • You found a UUID in a log and want to know when it was created and what generated it.
  • You need a correlation ID for tracing a request across services.

Worked Examples

Ten v7 UUIDs, in order

Look at the output: the leading characters are nearly identical and increase down the list, because the first 48 bits are the timestamp. That is why v7 sorts chronologically as plain text — and why it behaves well as a database key.

Ten v4 UUIDs, for comparison

Same tool, no pattern at all. Every one starts differently because 122 of the 128 bits are random. Excellent for unguessability, poor for a clustered index.

Inspect a UUID with a hidden timestamp

A v7 UUID. The inspector pulls the creation time back out of the leading bits and shows it in your own timezone — worth remembering if the identifier is publicly visible and creation time is something you would rather not publish.

The nil UUID

All zeros. It is the conventional 'no value' UUID and is never randomly generated, so seeing one in your data almost always means an uninitialised variable rather than a real identifier.

Common Mistakes

  • Using v4 as a clustered primary key on a large table. Random values scatter inserts across the whole index, causing page splits and steadily worse write performance as the table grows. This is the specific problem v7 was created to solve — use it, or keep an auto-increment key and treat the UUID as a secondary identifier.
  • Generating UUIDs with Math.random. It is not a cryptographic source and its output is predictable from previous values, so identifiers can be guessed. This tool uses crypto.getRandomValues; so should your code.
  • Assuming UUIDs are secret. They are unique, not unguessable-by-design in every version — v1 and v7 both encode a timestamp, and v1 may encode a machine address. Never use a UUID as a bearer token or a password-reset key.
  • Storing a UUID as a 36-character string when your database has a native type. Postgres has uuid and MySQL can use BINARY(16); both take 16 bytes instead of 36 and index far better.
  • Treating a v1 UUID's node field as anonymous. It is meant to be the MAC address of the generating machine, which is exactly why v1 fell out of favour — it can identify the hardware that produced the identifier.

Features

v4 random
v7 time-ordered and v1 legacy
Bulk generation up to 1000 at a time
Uppercase
braces and no-hyphen formats
Copy as plain list
JSON array or CSV
Download as a text file
Inspector that decodes version
variant and creation time
Detects nil and max sentinel UUIDs
Warns when a v1 node looks like a real MAC address
Uses crypto.getRandomValues
never Math.random
Runs entirely in your browser

How to Use

1. Pick a version — v4 unless you are choosing a database key, in which case consider v7. 2. Set how many you need and hit Generate. 3. Adjust the format toggles; these re-format the same UUIDs rather than generating new ones. 4. Copy in whichever shape you need, or download as a file. 5. Paste any UUID into the inspector at the bottom to decode it.

Frequently Asked Questions

Embed this UUID Generator

Paste this snippet into your site to embed the tool.

Everything is generated in your browser using crypto.getRandomValues, the same source your language's secure random API uses. Nothing is requested from a server, which matters for identifiers: a UUID handed to you by someone else's server is a value they have seen. UUIDs are designed to be unique, not secret — v1 and v7 both encode their creation time, and v1 may encode the generating machine's MAC address. Do not use any UUID as a security token.

Explore related topics

#Generator #Developer #Web