UUID Generator
Generate UUIDs instantly in your browser — v4 random, v7 time-ordered, v1, or the nil UUID. Generate one or ten thousand, pick the output format, and paste any UUID back in to read its version, variant, and embedded timestamp.
Whether you call it uuid generator or GUID generator, this free tool handles it instantly in your browser.
Options
Example usage
Example input
Example output
51a4c880-913b-49b2-b993-72404b72c918 bbdd31f0-2438-46e5-9fba-ffcab35a1aa8 669344fd-7dc1-4f51-9a00-02e5e1a647a7 59703e18-2b49-4f95-8d3c-3932ce007f4a 70f5266a-d968-45b8-a8e5-fdc43782bd03 c0f5baf0-9686-410e-83a4-669e9f196c2b 4b46a2c2-4052-4202-8aee-a91f1b8df7f6 30dab633-7e07-4ffb-ba7e-ba012b447dff 4fd64b1e-02ba-4afa-bf67-13ce5d0a391a dbb12deb-fadc-423c-aea4-598d973d8bcd
Batch Processing
Enter multiple inputs, one per line. Each line will be processed separately.
More like this
Discover related tools and step-by-step guides for this kind of task.
How it works
- UUIDs are generated in your browser using the WebCrypto random number generator — nothing is requested from a server and nothing is logged.
- Version 4 is 122 random bits. Version 7 puts a 48-bit Unix millisecond timestamp first, which makes the values sort chronologically as strings.
- Version 1 embeds a timestamp and a node identifier; the node here is randomised rather than taken from a hardware address, because a browser has no MAC to read and leaking one would be a privacy problem.
- Decode mode reads the version digit and variant bits back out of any UUID you paste, and recovers the creation time from v1 and v7 values.
Use cases
UUID v4 vs v7: which to use for database keys
A version 4 UUID is 122 random bits with nothing else in it. That is exactly what you want when the identifier must leak no information, but it is the wrong shape for a database primary key. B-tree indexes are ordered structures, and inserting random values means every write lands in a different page of the index. On a large table that fragments the index, inflates its size, and turns what should be an append into a scattered set of page splits.
A version 7 UUID fixes this by putting a 48-bit Unix millisecond timestamp in the leading bytes, followed by random bits. Because the timestamp is big-endian and comes first, sorting v7 values as strings or as bytes gives chronological order, so new rows append to the end of the index the way an auto-increment integer does. You keep the two properties that made you choose a UUID in the first place: you can generate it on the client without a round trip, and it is globally unique across shards.
Version 7 was standardised in RFC 9562, published in 2024, which replaced the long-standing RFC 4122 and also defined v6 and v8. If your database driver or ORM supports v7, it is the better default for new tables. Use v4 when the identifier appears in a URL and you would rather not reveal when the record was created — a v7 UUID tells anyone who reads it the creation time to the millisecond.
What the version and variant digits actually mean
Every UUID carries its own metadata in fixed positions. The 13th hexadecimal digit is the version — the 4 in the third group of a v4 UUID is not random, it is a label. The first digit of the fourth group encodes the variant, and for anything following the RFC it will be 8, 9, a, or b. That is why those two positions look suspiciously non-random when you generate a few hundred: they are not random at all.
This is what makes decoding possible. Paste an unfamiliar UUID into decode mode and the version digit tells you what kind it is, which in turn tells you whether a timestamp can be recovered. From a v1 or v7 value you get the creation time; from a v4 you get nothing, because there is nothing there. A v1 UUID also carries a node identifier in its last six bytes, which was historically the machine’s MAC address — if the multicast bit is set, the node was randomised instead, which is what this tool does.
The nil UUID, all zeroes, is a deliberate placeholder meaning "no value". It is occasionally useful as a sentinel, but be careful: some libraries treat it as valid and others as an error, so it behaves inconsistently across a stack.
Collisions, and why you do not need to check for them
The usual worry about client-generated identifiers is duplicates. For a v4 UUID the arithmetic settles it. With 122 random bits there are roughly 5.3 x 10^36 possible values, and the birthday bound says you would need to generate about 2.7 x 10^18 of them before the chance of any collision reaches 50%. At a million per second that is tens of thousands of years of continuous generation.
The practical risk is not mathematics but entropy. A UUID generated from a weak random source — a seeded pseudo-random generator, or one that was reset on process fork — can and does collide. That is why this tool uses the browser’s crypto.getRandomValues() rather than Math.random(). If you generate UUIDs server-side, check that your library does the same; several older ones did not.
One thing worth saying plainly: a UUID is an identifier, not a secret. It is unguessable enough to be unenumerable, which is useful for a public URL, but it is not an authentication token. Anything that grants access should be generated by the service that verifies it.
Developer
Explore all developer text tools
Browse every tool for this kind of task, along with helpful guides that show you how to get the most out of them.
Related tools
Conversion History
Loading...
FAQ
What is the difference between a UUID and a GUID?
Nothing functional. GUID is Microsoft’s name for the same 128-bit identifier that the RFC calls a UUID, and the two terms are interchangeable. The only difference you will notice is presentation: Microsoft tooling often wraps the value in braces, which is why this tool offers a braces format.
Which UUID version should I use for database primary keys?
Version 7, if your stack supports it. A v4 UUID is entirely random, so consecutive inserts land in random places in a B-tree index, which fragments the index and hurts write performance on large tables. A v7 UUID leads with its timestamp, so new rows append to the end of the index the way an auto-increment integer does, while still being globally unique and safe to generate on the client.
Why is UUID v7 better than v4 for sorted data?
Because the first 48 bits are the Unix timestamp in milliseconds, big-endian. That means sorting v7 UUIDs as plain strings or bytes gives you chronological order for free — no separate created_at column needed for ordering, and no random index writes. Version 7 was standardised in RFC 9562, which replaced the older RFC 4122.
Are the UUIDs generated here truly random?
The v4 and v7 random bits come from crypto.getRandomValues(), your browser’s cryptographically secure random number generator — the same source a password generator would use. They are suitable as unguessable identifiers. They are still identifiers rather than secrets, so do not use a UUID as a password or an API key.
Can two UUIDs ever collide?
In theory yes, in practice no. A v4 UUID has 122 random bits, so you would need to generate about 2.7 x 10^18 of them before the chance of a single collision reaches 50%. At a million UUIDs per second that is tens of thousands of years. You do not need to check for duplicates.
Are my generated UUIDs sent anywhere?
No. Generation happens entirely in your browser with JavaScript. No UUID is transmitted, stored, or logged, which matters because identifiers often end up in production data.
How do I generate thousands of UUIDs at once?
Set the count field to the number you need, up to 10,000, and choose a format that suits where they are going — "quoted array" for JSON or JavaScript, "SQL insert list" for a database seed, or plain lines for a CSV column. Use the download button to save the batch as a file.
Can I tell when a UUID was created?
Only for versions that store a timestamp. Switch to decode mode and paste the value: v7 and v1 UUIDs both yield a creation time, and this tool shows it as an ISO date. A v4 UUID contains no timestamp at all, so there is nothing to recover — the decoder says so explicitly rather than guessing.

