99tools

UUID Generator

runs in your browser

Generate UUID v4 and v7, ULIDs, Nano IDs and short IDs in bulk, and inspect any UUID to read its version, variant and creation time.

Kind

Random. The usual choice.

Identifiers

5 generated
  • 1cba61e03-4aca-4839-9f48-9de8b486a12f
  • 2accb6fa3-30c0-4dd6-b395-5c730cd3767d
  • 3b3efaab6-82e5-43c1-bd92-47263afdab2c
  • 466b7b338-8b75-4cdf-b053-8378c3f969a3
  • 5ec3d7339-be4c-4e59-8f80-ceba552a5c25

Generated with the browser’s cryptographic random source, not Math.random, so these cannot be predicted.

Inspect a UUID

about this tool

Which identifier to use

UUID v4 is 122 random bits. Use it when you want an identifier that reveals nothing and can be generated anywhere without coordination. Its weakness is that random values scatter across a database index, so inserting many of them into a clustered primary key fragments it.

UUID v7 fixes that. It puts a millisecond timestamp in the leading bits, so values sort roughly in creation order and inserts land at the end of the index instead of all over it. It is the sensible default for new database keys, at the cost of leaking roughly when a row was made.

ULID solves the same problem with a 26-character Crockford Base32 string — shorter than a UUID, case-insensitive, and lexicographically sortable as text.

Nano ID is a compact URL-safe random string, 21 characters by default, for public-facing identifiers where a 36-character UUID looks absurd.

The nil UUID is all zeros, occasionally useful as a placeholder or sentinel.

Generating in bulk

Ask for up to 500 at a time and copy or download the lot — enough to seed a fixture file or a test database without scripting it. Formatting options cover uppercase, and braces or no hyphens for the systems that want them that way.

Inspecting an existing UUID

Paste one and you get its version and variant, and for a v7 the creation time decoded from its timestamp. This answers a question that comes up in real debugging: whether the ids in a table are actually v4, or v1 values that quietly encode a MAC address and a date.

About the randomness

Every value comes from the browser's cryptographic random source, not Math.random. Generation happens entirely in the page, so an identifier you are about to use as a secret was never transmitted anywhere.

The same source drives the password generator, whose page explains the rejection-sampling detail that keeps it unbiased.

Are collisions a real risk?

Not at any scale you will meet. With 122 random bits you would need to generate billions of v4 UUIDs before a collision became likely enough to plan for. What does bite people is truncating one to save space — cutting a UUID to its first eight characters throws away almost all of that margin.

questions

Should I use UUID v4 or v7 for a database key?
v7 in most cases. Its leading bits are a timestamp, so values sort in creation order and inserts land at the end of the index instead of scattering through it. Choose v4 instead when the identifier must not reveal when it was created.
What is the difference between a UUID and a ULID?
They carry similar information, but a ULID is a 26-character Crockford Base32 string that is case-insensitive and sorts correctly as plain text, whereas a UUID is 36 characters with hyphens. Both are time-ordered in their modern forms.
Are UUID collisions something I need to plan for?
Not at any realistic scale: a v4 has 122 random bits, so you would need billions before a collision became likely. The real risk is truncation, since shortening a UUID to its first few characters discards almost all of that margin.
Are these UUIDs cryptographically random?
Yes. They come from the browser's cryptographic random source rather than Math.random, and they are generated in the page, so a value you intend to use as a secret is never sent anywhere.
Can I find out when a UUID was created?
For a v7 or a ULID, yes — paste it in and the timestamp is decoded for you. A v4 contains no time information at all, and the inspector will tell you its version so you know which you are holding.