A UUID generator that also gives you sortable identifiers

Any generator can produce a version 4 UUID, and most produce them perfectly well. The question worth asking before you paste one into a schema is whether a completely random identifier is the right thing for the column you are about to put it in.

Open the UUID Generator →

UUID Generator and Softland, side by side

 UUID GeneratorSoftland
Version 4 UUIDsYes, singly and in bulkYes, singly and in bulk
ULIDsNot offeredYes - time-ordered and lexicographically sortable
Version 1, 3 and 5 UUIDsAvailableNot offered
Where the randomness comes fromGenerated for you and returnedYour own browser cryptographic random source
API for automated useAvailableNone - it is a page

Random identifiers and the index they land in

A version 4 UUID is 122 bits of randomness, which makes it excellent at being unique and actively bad at being ordered. Used as a primary key in a database that stores rows in key order, every insert lands at a random point in the index rather than at the end. The tree fragments, pages split, and the write amplification shows up as a performance problem long after anyone remembers choosing the key type.

A ULID encodes a millisecond timestamp in its leading bits followed by randomness. It is the same 128 bits, it is still practically collision-free, it is still safe to generate on several machines at once, and it sorts chronologically as a plain string. Sorting by ID sorts by creation time, and range queries over a time window become possible without a second index.

What a ULID gives away

The timestamp is readable. Anyone holding a ULID can recover roughly when the record was created, and holding two tells them the gap between them. For an order ID that is usually fine and sometimes useful. For an identifier that is exposed publicly and where creation time is sensitive, it leaks something a random UUID does not.

That is the trade in one sentence: a UUID reveals nothing and sorts badly, a ULID sorts well and reveals when. Pick per column rather than per project. Internal primary keys benefit from ordering; public-facing tokens usually should not carry a clock.

Generated where, and does it matter

Values here come from the cryptographic random number generator in your browser, the same source used for key material, not from a general-purpose pseudo-random function. Nothing is requested from a server and nothing is recorded, so no copy of any identifier you generate exists anywhere but your clipboard.

For test fixtures and schema examples that is merely tidy rather than important. It matters when the identifier is going to be a secret - an invite code, an unguessable URL, a one-time reference - where a value that was transmitted, logged or served from a cache is no longer unguessable.

When UUID Generator is the better choice

  • You need version 1, 3 or 5 - a timestamp-and-MAC UUID, or a deterministic one derived from a namespace and a name.
  • You want an API so a script can request identifiers rather than a person copying them.
  • You need a very large batch, where a page rendering them all is the wrong shape for the job.

Frequently asked questions

Are these cryptographically random?
Yes. They come from the browser cryptographic random source rather than a general-purpose pseudo-random function, so they are suitable where an identifier also has to be unguessable.
What is the difference between a UUID and a ULID?
Both are 128 bits. A version 4 UUID is entirely random. A ULID puts a millisecond timestamp in the leading bits, so it sorts chronologically as text - which suits a primary key, at the cost of revealing when it was created.
Can two UUIDs ever collide?
In theory. In practice 122 bits of randomness means you would need to generate them at an implausible rate for an implausible time before a collision became likely enough to plan for.
Are the generated values recorded anywhere?
No. They are produced in your browser and never transmitted, which is what makes them usable as secrets rather than only as identifiers.

Try it yourself

Generate v4 UUIDs and ULIDs in bulk.

Open the UUID Generator

UUID Generator is a trademark of its respective owner. Softland is not affiliated with, endorsed by or sponsored by UUID Generator. This comparison reflects how each product works rather than what either costs, because pricing and plan limits change; check UUID Generator’s own site for its current terms.