A UUID and GUID generator for everything from database keys to short links: random UUID v4, time-ordered v7 and v6, time-based v1, name-based v5 and v3, Windows-style GUIDs, ULIDs, and short random IDs of any length from the characters you choose, in bulk. The random ones come from the browser’s cryptographic random number generator rather than Math.random, so they are suitable for identifiers that need to be unguessable. Paste any UUID or ULID into the checker to see its version and, for the time-based kinds, when it was made, and to get it in every other form; or paste a whole list to check them all at once.
Generate a batch, copy the lot, and paste them into fixtures or a migration. It is free to use, with no account and no upload limit, and it runs entirely in your browser: nothing is uploaded, and while the page stays open, a feature you have already used keeps working offline.
- What is a UUID?
- A universally unique identifier: a 128-bit number written as 32 hex digits in five groups, like
3f2b8c1e-9d4a-4f6b-8e2c-5a7d1b0c9e34. Anyone can make one without asking a central register, and the chance of two random ones matching is so small that systems treat them as unique. Microsoft calls the same thing a GUID. - Is a GUID the same as a UUID?
- Yes. GUID (globally unique identifier) is Microsoft’s name for a UUID: the same 128 bits and the same 8-4-4-4-12 layout. Windows tools tend to write them in capitals and often in braces, like
{3F2B8C1E-9D4A-4F6B-8E2C-5A7D1B0C9E34}, while most other systems use lowercase without braces; the value is the same either way. The one real difference is in bytes: .NET’s Guid.ToByteArray() and the Windows GUID structure store the first three groups byte-swapped, so the converter above shows both byte orders. - Which version does Windows use?
- Version 4, random. .NET’s
Guid.NewGuid(), PowerShell’s New-Guid and SQL Server’s NEWID() all give random version 4 GUIDs, the same kind as UUID v4 here. .NET 9 added Guid.CreateVersion7() for time-ordered version 7 GUIDs. Press GUID (Windows) above to get v4 in the capitals Windows tools use. - What are UUID v5 and v3 for?
- Turning a name into a UUID that never changes. Pick a namespace (DNS for domain names, URL for web addresses, OID, X.500, or any UUID of your own) and type a name: the namespace and the name are hashed, SHA-1 for v5 and MD5 for v3, and the same pair always gives the same UUID, on this page or in any other correct implementation. For example, the DNS namespace and
www.example.com give 2ed6657d-e927-568b-95e1-2665a8aea6a2 as v5. They are not random and not secret: anyone with the name can work the UUID out. - Can two random UUIDs ever be the same?
- In theory, yes; in practice, no. A version 4 UUID has 122 random bits. You would need to make about 2.7 quintillion of them before there was even a 50% chance that any two matched. A duplicate in real life almost always means a bug, such as copying an ID instead of generating a new one.
- What is the difference between UUID v4 and v7?
- v4 is entirely random. v7 puts a timestamp in the leading bits, so IDs generated later sort after earlier ones - even within one batch made in the same millisecond, where a counter keeps them in order - which keeps database indexes from fragmenting the way random keys do. Use v7 for anything that becomes a primary key.
- Are these random enough to be unguessable?
- The random kinds are. UUID v4, the random parts of v7, v1, v6 and ULIDs, and Nano IDs come from the browser's cryptographic random number generator, not Math.random, so v4 and Nano IDs are suitable for identifiers that must not be predictable - a share link or a password reset token. Time-based IDs give away when they were made, and v5 and v3 are worked out from their name, so use neither as a secret.
- What is a Nano ID for?
- A shorter, URL-safe identifier. It fits in a link or a filename far more comfortably than a 36-character UUID while still being long enough not to collide in practice.
- Is anything about these IDs recorded?
- No. They are generated in your browser and this site never sees them, which is the only sane arrangement for a value you may be about to use as a secret.
- Can it produce thousands at once?
- Yes, up to 100,000 at a time. The page lists the first 500; Copy all and the downloads take the whole batch.
- What is a ULID, and when should I use one instead of a UUID?
- A ULID is 128 bits like a UUID, written as 26 capital letters and digits: the first 10 are the time it was made, the other 16 random. ULIDs sort by creation time, as UUID v7 does, and are shorter to read and copy. Use a ULID where the system expects one; where it expects a UUID, v7 gives the same time order in the standard form.
- How do I generate a short random ID, like a code of 8 digits or letters?
- Choose Nano ID / random, set the length, and pick the characters: digits only for a numeric code, no look-alikes for something people will type, or your own set under Custom. The line below shows how many bits of randomness each one carries; 64 or more is plenty for IDs that must not repeat across millions.
- How can I tell which version a UUID is, or when it was made?
- Paste it into Check and convert. The version is the first digit of the third group (the 4 in xxxxxxxx-xxxx-4xxx-...); the checker names it, and for version 1, 6 and 7 UUIDs and for ULIDs it reads the time they were made, to the millisecond. Version 4 holds no time at all. For many at once, paste them into Check a list of IDs, one per line (quotes round an ID and a comma or semicolon after it are ignored): each is valid, invalid with the reason, or not standard, meaning the right shape but not a standard version or variant, such as an old Microsoft-variant GUID. Valid ones show their version.
- How do I convert a UUID to Base64, bytes or a number, or a ULID to a UUID?
- Paste it into Check and convert. It is written with and without hyphens, in braces, as a URN, as Base64 (24 characters) and URL-safe Base64 (22, without padding), as 16 bytes in both RFC order and .NET’s
ToByteArray() order, and as its 128-bit integer. Paste a ULID to get the UUID with the same 128 bits, or a UUID to get its ULID. Click any line to copy it. - How do I get a UUID from the command line?
- On a Mac or Linux, type
uuidgen in a terminal (add | tr A-Z a-z on a Mac for lower case). In Windows PowerShell, type New-Guid or [guid]::NewGuid(). In Python, import uuid; print(uuid.uuid4()). All three give a version 4 UUID like the ones on this page; for version 7, or a batch, use the generator above. - How do I generate a UUID in JavaScript, Java, C# or SQL?
- JavaScript in a browser or Node:
crypto.randomUUID(). Java: UUID.randomUUID(). C#: Guid.NewGuid(), or Guid.CreateVersion7() on .NET 9 and later. PostgreSQL 13 and later: gen_random_uuid(), and from PostgreSQL 18 uuidv7(). SQL Server: NEWID(). MySQL: UUID(), which gives version 1. Apart from the version 7 ones named, the others give version 4.