navaja.dev / uuid

UUID generator and decoder

Generate random v4 UUIDs, time-sortable v7 UUIDs or ULIDs, one or ten thousand at a time. Paste any UUID or ULID to see its version and when it was created. Everything runs in your browser.

How to generate UUIDs

  1. Pick a kind: v4 for plain random ids, v7 or ULID for ids that sort by time, v5 to turn a name into a stable UUID.
  2. Choose how many (up to 10,000) and the format: uppercase, without hyphens, in braces like a Windows GUID, or with the urn:uuid: prefix.
  3. Copy the list or download it as a text file. Press Generate again for a fresh batch.

Which UUID version should I use?

Decode a UUID

Switch to Decode and paste one or more UUIDs or ULIDs, in any spelling: with or without hyphens, braces, uppercase or urn:uuid:. You get the version and variant, the creation time for v1, v6, v7 and ULID, the node for v1, and the same id written as a UUID, a ULID and plain hex. It's handy for finding when a record was created from its id alone.

Are these UUIDs safe to use?

Yes. They are made in your browser with crypto.getRandomValues, the cryptographically secure random generator, and are never sent anywhere. v7 and ULID are monotonic: ids generated in the same millisecond still sort in order. Note that v1, v7 and ULID reveal when they were created, so use v4 when that shouldn't be visible.

Questions

What is a UUID?

A UUID (universally unique identifier, also called GUID) is a 128-bit id written as 32 hex digits in five groups, like 123e4567-e89b-12d3-a456-426614174000. It can be generated anywhere without coordination and is practically guaranteed to be unique.

What is the difference between UUID v4 and v7?

v4 is fully random. v7 starts with the creation time in milliseconds followed by random bits, so v7 ids sort by time, which makes them much better database primary keys.

Can two UUIDs be the same?

In theory yes, in practice no. With v4's 122 random bits you would need to generate about a billion UUIDs per second for 85 years to reach a 50% chance of a single duplicate.

What is a ULID?

A Universally Unique Lexicographically Sortable Identifier: a 48-bit millisecond timestamp plus 80 random bits, written as 26 Crockford Base32 characters like 01ARZ3NDEKTSV4RRFFQ69G5FAV. It sorts by time and converts to and from a UUID.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit format. Windows often writes GUIDs in uppercase with braces, like {6BA7B810-9DAD-11D1-80B4-00C04FD430C8}; tick Uppercase and Braces to get that format.

Can I get the creation time from a UUID?

For time-based versions, yes: v1, v6 and v7 UUIDs and ULIDs contain their creation time. Paste one into Decode to see it. Random v4 and name-based v3/v5 UUIDs contain no time.

How do I generate a UUID in code?

JavaScript: crypto.randomUUID(). Python: uuid.uuid4(). PostgreSQL: gen_random_uuid() (v4) or uuidv7() in PostgreSQL 18. Java: UUID.randomUUID(). Go: github.com/google/uuid. Shell: uuidgen.

Are the UUIDs generated here random enough?

Yes. They use your browser's cryptographically secure random number generator (crypto.getRandomValues), the same source used for encryption keys.