UUID Generator
About the UUID Generator
This UUID generator creates version 4, 7 and 1 UUIDs (plus the special Nil and Max values) in batches of up to 1,000, using your browser's cryptographically secure random number generator. Copy them one at a time, copy the whole list or download a .txt file, and paste any existing UUID to check its version, variant and embedded timestamp.
What is a UUID?
A UUID (universally unique identifier, called a GUID in the Microsoft world) is a 128-bit value written as 32 hex digits in five groups: 550e8400-e29b-41d4-a716-446655440000. The current standard is RFC 9562, which replaced RFC 4122 in 2024.
Two positions carry metadata. The first digit of the third group is the version (4 in the example above), and the first digit of the fourth group holds the variant: 8, 9, a or b for standard RFC UUIDs.
UUID v4 vs v7 vs v1
Version 4 is 122 random bits. It reveals nothing about when or where it was made and is the default for most applications. You would need to generate about 2.7 quintillion v4 UUIDs before the chance of a single duplicate reaches 50%.
Version 7 starts with a 48-bit Unix timestamp in milliseconds, so newer IDs sort after older ones. This generator also uses the next 12 bits as a counter, keeping IDs created in the same millisecond in order. RFC 9562 recommends v7 over v1 for new systems.
Version 1 encodes a 60-bit timestamp counted in 100-nanosecond steps since 15 October 1582, a clock sequence and a node ID. Browsers cannot read a MAC address, so the node is random with the multicast bit set, as the RFC allows. Use v1 mainly for compatibility with older systems.
Choosing a UUID for database primary keys
Random v4 keys land at random positions in a B-tree index, which causes page splits and poor cache locality on large tables. Time-ordered v7 keys are appended near the end of the index instead, so inserts stay fast, while keeping the "generate anywhere without coordination" benefit of UUIDs.
Store UUIDs in a native uuid column (PostgreSQL) or BINARY(16) (MySQL) rather than VARCHAR(36). The binary form is less than half the size and faster to compare.
How to Use the UUID Generator
- Pick a Version: v4 - random, v7 - Unix time, sortable, v1 - Gregorian time, Nil (all zeros) or Max (all ones).
- Enter How many (1-1000) UUIDs you need.
- Toggle Uppercase or Hyphens to match the format your system expects.
- Click Generate. Use the copy icon on a row, Copy all for the full list, or .txt to download it.
- To check an existing ID, paste it into "Validate / inspect a UUID" to see whether it is valid, plus its version, variant and creation time for v1 and v7.
Frequently Asked Questions
- Are these UUIDs generated on a server?
- No. They are created in your browser with the Web Crypto API and are never sent or stored anywhere.
- Can two generated UUIDs ever be the same?
- In theory yes, in practice no. With 122 random bits, a duplicate v4 UUID is far less likely than a hardware error corrupting your data.
- Is a UUID the same as a GUID?
- Yes. GUID is Microsoft's name for the same 128-bit format. Some Microsoft tools print GUIDs in uppercase or wrapped in braces, which the validator also accepts.
- Should I use UUID v4 or v7?
- Use v7 for database keys and anything you want to sort by creation time. Use v4 when an ID must not reveal when it was created.
- Can I use a UUID as a secret token?
- Not safely. UUIDs are identifiers and often appear in URLs and logs, and v1 and v7 expose their creation time. Use a dedicated random token or the password generator for secrets.
- What are the Nil and Max UUIDs for?
- They are special values defined by RFC 9562: all zeros and all fs. They are used as placeholders or sentinel values, for example "no parent" or "upper bound".