ToolsCrate

UUID Generator

Generate one or a hundred random UUIDs at once. Also produces short, URL-friendly ids when a 36-character UUID is more than you need.

UUID v4 uses 122 random bits, so the chance of a collision is negligible even across billions of ids. Values come from your browser cryptographic random source and are never sent anywhere.

How to use

  1. 1Set how many UUIDs you want.
  2. 2Generate them — they use your browser's cryptographic random number generator.
  3. 3Copy one, or copy the whole batch at once.
  4. 4Switch to the short id option when 36 characters is more than you need.

Frequently Asked Questions

What is a UUID v4?

A 128-bit identifier where 122 bits are random. The version and variant bits are fixed, which is why every v4 UUID has a 4 at the start of the third group.

Can two UUIDs collide?

In theory yes, in practice no. You would need to generate about 2.7 quintillion UUIDs before the chance of a single collision reaches even one in a billion.

When should I use a short ID instead?

When the id appears in a URL that people see or type. A 21-character short id has roughly the same collision resistance as a UUID but is far more compact — useful for share links and public-facing routes.

Are these UUIDs generated on your server?

No. They are produced in your browser by crypto.randomUUID, so no request is made and nobody else ever sees the values.

Should I use a UUID as a database primary key?

It works and avoids coordination between servers, but random UUIDs scatter writes across the index and can hurt insert performance on large tables. Sequential integers or time-ordered ids are usually faster if you do not need global uniqueness.

Is a UUID safe to expose in a URL?

A v4 UUID is random, so it does not leak a count or a creation time the way a sequential id does. It is not a secret, though — treat it as an identifier, not an access token.