Practical guides on IT careers, blogging & online income for beginners.

UUID Generator (v4, v7, v1 & v5)

Pick a UUID type, choose how many you need and copy them. Everything is generated in your browser using its secure random number generator.

  • Free
  • No sign-up
  • Runs in your browser

Check a UUID

Everything runs in your browser. What you type here is never uploaded, stored or sent anywhere.

What is a UUID?

A UUID (Universally Unique Identifier, also called a GUID in the Microsoft world) is a 128-bit value written as 32 hex digits in the pattern 8-4-4-4-12, for example f47ac10b-58cc-4372-a567-0e02b2c3d479. It lets many systems create IDs on their own, with no central counter, and still avoid clashes in practice.

Which version should you pick? Version 4 is fully random and the usual default. Version 7 puts the current time at the start, so new IDs sort in creation order. That makes it a much better primary key for databases like MySQL and PostgreSQL, because inserts stay close together in the index instead of landing all over it. Version 1 is also time-based but older and exposes more of its structure. Version 5 is different: it hashes a namespace and a name, so the same input always gives the same UUID, which is handy for stable IDs.

A UUID is an identifier, not a secret. Do not use one as a password or an access token. If you are building SQL for a table that uses UUID keys, the SQL Generator can write the statements, and the Base64 Encoder / Decoder helps when you need a shorter, URL-friendly form.

How to generate a UUID

  1. Choose a UUID type. If you are not sure, v4 for general use or v7 for database primary keys.
  2. Set how many you need, up to 1,000.
  3. Turn on any format options you need, such as uppercase or no hyphens.
  4. Click Copy all or Download .txt. For version 5, enter one or more names first.

What people use UUIDs for

  • Primary keys in databases, especially distributed systems and APIs.
  • Unique file names for uploads, so two users never overwrite each other.
  • Request, trace and correlation IDs in logs.
  • Test data and seed files with a lot of unique IDs.
  • Stable IDs from a name, using version 5, for example for a URL or a domain.

Frequently asked questions

Can two UUIDs ever be the same?

In theory yes, in practice no. A random v4 UUID has 122 random bits. You would need to generate billions per second for many years before a clash became likely. The real-world risk is a faulty random number generator, which is why this tool uses your browser's secure one.

What is the difference between UUID v4 and v7?

v4 is entirely random. v7 starts with a millisecond timestamp and then adds random bits, so the IDs sort by creation time. For database primary keys v7 usually performs better because new rows are added near the end of the index. v4 is still fine for most other uses.

Is a UUID the same as a GUID?

Yes. GUID (Globally Unique Identifier) is Microsoft's name for the same 128-bit format. Microsoft tools often show them in uppercase and inside braces, which you can switch on here.

What is a version 5 UUID for?

It turns a namespace and a name into a UUID using SHA-1. The same name always produces the same UUID, so you can regenerate it any time without storing it. For example, the DNS namespace with the name python.org always gives 886313e1-3b8a-5372-9b90-0c9aee199e5d.

Can I use a UUID as a password or token?

No. A UUID is built to be unique, not to be secret. A v1 or v7 UUID even contains a timestamp. For a session token or API key use a purpose-built random token with a proper secrets library.

Is anything sent to a server?

No. The UUIDs are created in your browser and nothing is uploaded or stored.