Skip to content

UUID Generator: v4, v7, v1, v5 and ULID

Generate random UUID v4, time-ordered v7, name-based v5 or ULIDs, up to 1,000 at a time, or decode one to see its version and time. Runs in your browser.

Runs in your browser

Everything happens on your device: nothing you paste or type is sent to our server or stored. A share link holds your settings, and your input only if you choose to include it.

More options

Method: RFC 9562 (2024) UUIDs; ULID specification · uuid 14.0.3, ulid 3.0.2

The link holds your settings only: what you enter here is private and never goes into a link.

How it works

IDs are made in your browser from your device's cryptographic random number generator (crypto.getRandomValues), the source browsers use for encryption keys, with the open-source uuid and ulid libraries loaded on this page only. They are not sent anywhere, not stored, and not in the page's HTML, so nobody else is shown the same ID. A shared link holds only your settings, so whoever opens it gets new IDs.

Each version follows RFC 9562 (May 2024), which replaced RFC 4122. Version 4 is 122 random bits. Version 7 puts the Unix time in milliseconds in the first 48 bits and fills the rest with random bits, and within one batch a counter keeps IDs in order even inside the same millisecond. Versions 1 and 6 hold a 60-bit count of 100-nanosecond intervals since 15 October 1582; this tool uses a random node instead of your network card's address, as RFC 9562 §6.10 recommends. Versions 3 and 5 hash a namespace and a name with MD5 or SHA-1, so the same name always gives the same UUID.

Decoding reads the version from the 13th hex digit and the variant from the top bits of the 17th, then, for versions 1, 6 and 7, turns the stored time into a date in UTC and in your time zone. ULIDs carry the Unix time in milliseconds in their first 10 characters. Every result was checked against the examples in RFC 9562 Appendix A.

Standards this tool follows

UUID Generator: Which UUID Version to Use, and How to Read One

By FindMySum · Last reviewed

This UUID generator makes random version 4 UUIDs by default, and time-ordered version 7, name-based version 5, legacy versions 1, 3 and 6, the nil and max UUIDs, or ULIDs, up to 1,000 at a time. Switch to decode mode to check a UUID you already have: it shows the version, the variant and, for time-based IDs, the moment it was created.

When to use which

  • Version 4 is the everyday choice: a random identifier for a record, a file, a request or a test fixture.
  • Version 7 is better for database primary keys, because IDs made later sort later.
  • Version 5 turns a name into a stable UUID: www.example.com in the DNS namespace is always 2ed6657d-e927-568b-95e1-2665a8aea6a2. Use it when two systems must agree on an ID without talking to each other.
  • ULID is a 26-character time-ordered ID that is shorter to read and type than a UUID.
  • Versions 1, 3 and 6 exist for compatibility with older systems.

How to use the tool

  1. Pick a version and how many IDs you need.
  2. For version 3 or 5, choose the namespace and type the name.
  3. Copy the IDs or download them as a text file, and press Generate new for another batch.
  4. To read an existing ID, switch to Decode and paste one or more IDs, one per line. Braces, a urn:uuid: prefix, missing hyphens and either case are all accepted.

A worked example

RFC 9562 gives 017F22E2-79B0-7CC3-98C4-DC0C0C07398F as its version 7 example. The 13th hex digit is 7, so it is version 7. The 17th digit, 9, starts with the bits 10, which is the RFC 9562 variant. The first 12 hex digits, 017F22E279B0, are 1,645,557,742,000 milliseconds after 1 January 1970: 22 February 2022 at 19:22:22 UTC, the same instant as the RFC's version 1 and version 6 examples.

Common mistakes

Using UUIDs as secrets. A UUID is hard to guess but isn't designed as a password or an access token; use a token generator for that.

Expecting v4 to sort by time. Random UUIDs have no order. If you need "newest first", use version 7 or store a timestamp.

Comparing as text in different cases. ABC… and abc… are the same UUID; normalise to lower case before comparing.

To turn a timestamp into a date by hand, use the Unix timestamp converter.

Sources

Frequently Asked Questions

Are UUIDs really unique?

Not guaranteed, but close enough. A version 4 UUID has 122 random bits, so you'd need to generate about 2.7 quintillion of them before the chance of a single duplicate reached 50%. The real risk is a broken random source, which is why this tool uses the browser's cryptographic generator.

Should I use UUID v4 or v7 for database keys?

v7 for new tables. Because v7 IDs start with the time, new rows go at the end of the index instead of at random places in it, which keeps inserts fast in PostgreSQL, MySQL and SQL Server. v4 is fine when the order doesn't matter or you don't want the creation time to be visible.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit format. Windows tools often write GUIDs in upper case and in braces, such as {2ED6657D-E927-568B-95E1-2665A8AEA6A2}; the format option produces that style, and the decoder accepts it.

Can a UUID reveal anything about me?

Version 7 and ULIDs reveal when they were made, to the millisecond. Old version 1 UUIDs could contain the computer's network card address, but these use a random value instead. Version 4 reveals nothing.

Spotted a wrong result or a bug? Report a problem (the link sends the page address only, never what you entered).

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy