UUID Generator

Generate one or a thousand UUIDs in the version and format you need, and decode any UUID you paste.

  • Processed on your device
  • Instant, no queue
  • Free, no sign-up
Advertisement

Inspect a UUID

Advertisement

How to use UUID Generator

  1. Pick a version. Version 4 suits most uses; version 7 is better for database keys.
  2. Choose how many you need and how they should look: uppercase, without hyphens, in braces, or wrapped as JSON or SQL.
  3. Copy or download the list. Paste any UUID into Inspect a UUID to see what kind it is.

About this tool

A UUID (universally unique identifier, also called a GUID) is a 128-bit ID such as 3f2b8c1e-7d4a-4b9e-9c21-5e8f0a6d1b47. It can be created anywhere without checking with a central server, and the chance of two random UUIDs ever matching is negligible.

Version 4 is 122 random bits, made with your browser's secure random generator. Version 7 starts with the current time in milliseconds, so new IDs sort after older ones. That keeps database indexes compact and fast, and is why it is now recommended for primary keys (RFC 9562).

Versions 5 and 3 are not random. They are calculated from a namespace and a name, so the same input always gives the same UUID. That is useful for turning existing identifiers, such as domain names or URLs, into stable IDs. Version 5 uses SHA-1 and is preferred over version 3, which uses MD5.

Questions and answers

What is the difference between a UUID and a GUID?

Nothing in practice. GUID is Microsoft's name for the same 128-bit format.

Can two UUIDs be the same?

For version 4 the odds are astronomically small: you would need to generate about a billion per second for 85 years to have a 50% chance of a single duplicate.

Which version should I use for database keys?

Version 7. It is unique like version 4, but ordered by time, which keeps database indexes efficient.

Can I tell when a UUID was created?

For versions 1, 6 and 7, yes. Paste it into Inspect a UUID to see the timestamp. Versions 3, 4 and 5 contain no time.

Advertisement