Skip to content
DeviceCheckHub

UUID Generator

Make random or time-ordered UUIDs, one or a thousand at a time, and check what any UUID means. It all happens in your browser.

5 version 4 UUIDs made in your browser.

Name-based UUID (version 5 or 3)

The same namespace and name always give the same UUID, so a system can work out an id again instead of storing it. Version 5 is the one to use unless a system asks for version 3. The style options above apply here too.

Type a name, such as a domain or a URL, to get its UUID.
—

Check a UUID

Paste a UUID to see its version, variant and, when it has one, the time inside it.

How to make a UUID

  1. Choose Version 4 for a random UUID or Version 7 for one that starts with the time.
  2. Set how many you need, from 1 to 1,000. The list is made as soon as you change anything.
  3. Pick the style: capital letters, hyphens and braces, to match the system you will paste them into.
  4. Press Copy all to put the list on the clipboard, or Download to save it as a text file with one UUID per line.

What a UUID is

A UUID, or universally unique identifier, is a 128-bit number written as 32 hexadecimal digits in five groups, such as 550e8400-e29b-41d4-a716-446655440000. The idea is that any computer can make one at any time without asking a central service and still be practically certain that nobody else has made the same one. That is why UUIDs are used as database keys, file and upload names, order and tracking references, message ids and device ids. The standard is RFC 9562, published in 2024, which replaced the older RFC 4122 and added the newest versions.

Version 4 and version 7

Version 4 is the one most people mean. Apart from 6 bits that say which version and variant it is, all 122 other bits are random. It carries no information about when or where it was made, which makes it simple and private.

Version 7 puts the creation time first: the first 48 bits are the number of milliseconds since 1 January 1970, followed by random bits. Because the time comes first, version 7 UUIDs made later sort after those made earlier, both as text and as numbers. When many are made in the same millisecond, this generator counts up inside the batch so that the order of the list is also the sorted order. That makes version 7 a much better choice for the primary key of a database table: new rows go to the end of the index, instead of landing in random places and splitting pages, which is the usual complaint about random keys.

Other versions exist. Version 1 uses a clock reading and the computer’s network address, version 6 is a re-ordered version 1, and version 8 is left for custom layouts. The checker above reads all of them, and shows the time inside version 1 and version 7 UUIDs.

Name-based UUIDs: version 5 and version 3

Versions 5 and 3 don’t use randomness or a clock. They hash a namespace UUID together with a name, so the same pair always gives the same UUID, on any computer and in any language. That is useful when several systems must agree on an id without talking to each other, for example an id for each domain name, URL or product code. The standard (RFC 9562) defines four namespaces, for DNS names, URLs, ISO object identifiers and X.500 names, and you can use any UUID of your own as a namespace.

Version 5 hashes with SHA-1 and version 3 with MD5. Both hashes are weak for security, but that matters little here, because a name-based UUID is not meant to be secret: anyone who knows the namespace and the name can recreate it. The standard recommends version 5 over version 3 for new designs. As an example, the version 5 UUID of the name python.org in the DNS namespace is 886313e1-3b8a-5372-9b90-0c9aee199e5d, the same value Python’s documentation shows.

How unique is unique?

With 122 random bits there are about 5.3 × 1036 possible version 4 UUIDs. By the birthday problem, you would have to make about 2.7 × 1018 of them before the chance of a single repeat reaches 50%. At a billion UUIDs every second, that takes about 85 years. For a table of a billion rows the chance of any repeat is about 1 in 10 quintillion (10-19). This depends on good randomness: the UUIDs on this page use the browser’s cryptographic random generator, not Math.random(), which is not designed for this.

Formats: hyphens, capitals and braces

The same UUID can be written several ways, and they all mean the same value. The standard form is lowercase with hyphens. Windows, .NET and SQL Server often show capitals and braces, as in {550E8400-E29B-41D4-A716-446655440000}. Some systems store the 32 digits with no hyphens to save space, and a URN form, urn:uuid:550e8400-…, is used in some XML and identity documents. Comparing UUIDs as text is safe only when they are in the same format, so choose one and keep to it; the checker accepts all of these and shows the standard form.

UUID or a plain counter?

A database can also number its rows 1, 2, 3 and so on. Counters are small, easy to read and fast, so for a single database they are often the better choice. UUIDs earn their place when ids must be made in more than one place. Several servers, a phone app that works offline, or two systems that will be merged later can each make ids without talking to each other and without clashes. They are also useful when ids appear in web addresses: a sequential number lets anyone guess the next record, while a random UUID does not, although you should still check access rights on the server, because an unguessable address is not a lock. If you want both benefits, many teams keep a small counter for internal joins and a UUID for the public reference.

Make a UUID in code

Tips

Related tools: read a time inside a UUID with the Unix timestamp converter, make a strong password with the password generator, or draw numbers with the random number generator.

Frequently asked questions

What is the difference between a UUID and a GUID?

Nothing in practice. GUID, for globally unique identifier, is the name Microsoft uses for the same 128-bit value. A GUID from .NET or SQL Server and a UUID from Linux, Java or PostgreSQL follow the same layout and can be exchanged freely. Microsoft tools often write them in capital letters and in braces, which are the options offered above.

Can two UUIDs ever be the same?

It is possible in theory but so unlikely that it does not happen in practice. A version 4 UUID has 122 random bits, so after making about 2.7 quintillion of them (2.7 × 10^18) the chance of one repeat is only about 50%. Making a billion a second would take about 85 years to reach that. The random bits here come from your browser’s cryptographic random number generator, the same source used for passwords and keys.

Should I use version 4 or version 7?

Use version 4 when you just need a unique, unguessable-looking value, such as a file name, a session reference or a test record. Use version 7 for database keys: it starts with the creation time, so new rows are added at the end of an index instead of in random places, which is usually faster and keeps the table smaller. A version 7 UUID reveals when it was made, so do not use it where that would be a problem.

Is a UUID safe to use as a password or a secret token?

A version 4 UUID from a good random source is hard to guess, but it is meant to be an identifier, not a secret. It is a fixed length with a fixed pattern, it often ends up in web addresses and logs, and some systems make UUIDs in predictable ways. For a password, use the password generator on this site; for a secret token, use your platform’s cryptographic token function.

Are the UUIDs made on your server?

No. Every UUID is made in your browser and nothing is sent anywhere, so the list is private and works offline once the page has loaded. The page remembers your version, count and format choices on this device, but not the UUIDs themselves.

How do I make a version 5 UUID from a name?

Under Name-based UUID, choose a namespace (DNS for domain names, URL for web addresses, or your own namespace UUID), keep version 5 selected and type the name. The UUID appears straight away and is always the same for that namespace and name, so you can check it against another system, such as uuid.uuid5 in Python.

How do I read the version of a UUID?

Look at the first character of the third group: in 550e8400-e29b-41d4-a716-446655440000 it is 4, so this is a version 4 UUID. The first character of the fourth group (a here) gives the variant, and for standard UUIDs it is 8, 9, a or b. Paste any UUID into the checker above and it reads both for you, and shows the creation time of version 1 and version 7 UUIDs.

Last updated · About DeviceCheckHub