A version 4 UUID
- Input
- Generate, v4
- Output
- f47ac10b-58cc-4372-a567-0e02b2c3d479
122 of the 128 bits are random. The 4 at the start of the third group marks the version, and the first character of the fourth group marks the variant.
A UUID is a 128-bit identifier that can be generated independently anywhere and still be unique, which is why they are used for database keys and request ids. This generator uses the browser's cryptographic random source rather than Math.random, and offers version 7 alongside version 4 — v7 embeds a timestamp so the identifiers sort by creation time, which makes a dramatic difference to database index performance.
Runs entirely in your browser — nothing you paste is uploaded.
How to
Version 4 is entirely random and the usual choice. Version 7 starts with a millisecond timestamp, so a batch sorts in creation order — better for database keys.
Generate one or up to a thousand at once. A fresh batch is produced each time, and none of it is stored anywhere.
Standard lowercase with hyphens suits most uses. Uppercase, braces and hyphen-free variants are available for systems that expect them.
Copy the list, download it, or paste any existing UUID into the inspector to see which version and variant it is.
Examples
122 of the 128 bits are random. The 4 at the start of the third group marks the version, and the first character of the fourth group marks the variant.
The first 48 bits are a millisecond timestamp, so the ids increase over time. As a primary key this keeps database inserts at the end of the index instead of scattering them.
The inspector reads the version and variant bits, which tells you how the id was generated and therefore whether it carries a timestamp.
Why use it
Values come from the platform's cryptographic random source. Math.random is not used anywhere, since it is not designed to be unpredictable and can repeat across tabs.
Version 7 gives you uniqueness without the index fragmentation that random keys cause on a large table.
Produce a thousand at once for seed data or load testing, then copy or download the whole list.
Identifiers are generated in your browser and never sent or stored, so none of them can have been issued to anyone else.
Good to know
Summary
FAQ
Discover