The UUID generator was the first tool on this site and the reason the site exists. This post is the long version of what it does and why. If you only want a UUID, the generator is one click away. If you want to know what is behind the button, read on.
Why we built another UUID generator
There were already plenty. The problem was using them. Every generator I reached for during work had one of the same three faults: it took seconds to load because of ad scripts, it only made v4 when I needed v7 for a database key, or it wanted me to sign up before letting me copy more than a handful of values. Some sent the request to a server and gave me a value the server had seen first, which for an identifier that goes into production is a strange thing to accept.
So the brief was short. One page, no account, every version, as many as you need, made on your own machine. That page has grown, but the brief has not changed.
What it does
- Every standard version. v4 random, v7 time ordered, v1 and v6 time based, v3 and v5 name based, plus the nil and max values. The dropdown explains each one in a few words so you do not have to look it up.
- Batches up to 1000. Enough to seed a test table, fill a spreadsheet column, or pre-generate ids for an import. Each value gets its own copy button, and Copy All grabs the whole batch.
- Formats that match your platform. Uppercase for .NET and SQL Server habits, braces for the Windows registry style, no hyphens when a system wants 32 plain characters, quotes for pasting into JSON or code, and Base64 for the 22 character compact form. Tick a box and every value on screen changes.
- Export as a file. Download the batch as .txt with one value per line, as a .json array, or as a .csv with a header row.
- Name based ids done properly. v3 and v5 need a namespace and a name. The four standard namespaces, DNS, URL, OID and X.500, are built in, and you can paste any UUID as a custom namespace. Type example.com with the DNS namespace and you get the same v5 value that Python, PostgreSQL and every RFC library produce.
- A page per version and per language. Each version page pins the generator to that version and explains when to use it. Each language page shows the exact calls for v4, v7, v5 and validation in that language, with the mistakes to avoid.
- A validator and decoder. Paste one or hundreds of UUIDs into the validator and get version, variant, and for v1, v6 and v7 the timestamp that is baked into the value.
How it works, and why that matters
Everything runs in your browser. The page loads the open source uuid library, the same package most Node projects depend on, and that library reads randomness from crypto.getRandomValues, the browser's cryptographic source. Time based versions read your clock. Name based versions hash in JavaScript. When you click Generate, no request leaves your machine. You can confirm that in the network tab of your developer tools.
This is not only a privacy point. It is a correctness point. A UUID made from a weak random source is a UUID that can collide, and the web is full of snippets that build "UUIDs" from Math.random. Using the browser's real random source through a maintained library means the values here are as good as the ones your server would make. The collision post has the numbers.
Workflows it was built for
- Seeding test data. Generate 200 v4 values, download the CSV, import it. Or tick Quotes and paste straight into a fixture file.
- Choosing keys for a new table. Read the v4 vs v7 comparison, then generate v7 values on the v7 page to see how they sort.
- Reading a UUID from a log. Paste it into the validator. If it is v7 you get the exact creation time. If it is v1 you also get the node id.
- Turning an external key into a UUID. Use v5 with a namespace you keep for your application. The same customer number always gives the same id, on any machine, with no lookup table.
- Matching a platform's format. Uppercase with braces for a Windows registry entry, no hyphens for a system that stores 32 characters, Base64 for an API that wants short ids.
What we left out on purpose
There is no v2 and no v8 generator, and that is deliberate. v2 was built for a 1990s security system, has weak uniqueness and is implemented by almost no library. v8 is a custom layout where the application decides the contents, so a generic tool cannot produce one. The generator page explains both. The validator still recognises either version if you paste one in.
What is next
A collision calculator, so you can type the number of ids you plan to generate and see the real odds. And a bulk mode that streams larger batches to a file without rendering them all on screen. If there is something you keep wishing the generator did, the contact page is the place to say so.