UUID & NanoID Generator
About UUID / NanoID Generator
The UUID / NanoID generator produces unique identifiers on demand: classic random UUID v4, the newer time-ordered UUID v7, or a compact 21-character NanoID. Choose a type, pick how many you need, and get a clean list you can drop straight into a database seed, a test fixture or an API call.
Every id is generated locally in your browser using the platform crypto RNG (crypto.randomUUID and crypto.getRandomValues). Nothing is requested from a server and nothing you generate is uploaded, logged or stored — the ids exist only in your tab, which makes them safe to use for real records.
It is built for developers who need identifiers fast: primary keys, correlation ids, idempotency keys, file names or trace ids. Switch the output to a JSON array to paste a batch directly into code, or keep the one-per-line list for a quick copy. Free forever, no signup, no limit.
How it works
UUID v4 — random
Version 4 is 122 bits of cryptographic randomness with the version and variant bits fixed. It is the universal default: no coordination, effectively zero collision risk, and supported everywhere. The tool uses the browser's native crypto.randomUUID when available and a crypto.getRandomValues fallback otherwise.
UUID v7 — time-ordered
Version 7 (RFC 9562) puts a 48-bit Unix-millisecond timestamp at the front, then version and variant bits, then randomness. Because the leading bits increase over time, v7 ids sort chronologically — far friendlier to database B-tree indexes than the random scatter of v4.
NanoID — short and URL-safe
NanoID is a 21-character id drawn from a 64-symbol URL-safe alphabet (A-Z, a-z, 0-9, plus _ and -). It is shorter than a UUID, needs no hyphens, and is safe to drop into URLs or file names. The alphabet divides 256 evenly, so each character is unbiased.
Count and JSON output
Generate 1, 10 or 50 ids at a time. Leave the JSON toggle off for a plain one-per-line list you can copy, or turn it on to wrap the batch in a formatted JSON array ready to paste into a config, a seed script or a test.
Frequently asked questions
What is the difference between UUID v4 and v7?
v4 is fully random, so ids are unordered — great for privacy and simplicity. v7 embeds a millisecond timestamp at the start, so ids are time-sortable and index more efficiently in databases. Use v4 for general uniqueness and v7 when insertion order or index locality matters.
Is NanoID better than UUID?
Neither is strictly better — it is a trade-off. NanoID is shorter (21 chars vs 36) and URL-safe without hyphens, which is nice for links and file names. UUID is a formal standard recognised by databases and libraries. For public identifiers NanoID is often more compact; for interop UUID is safer.
Are these ids random and safe to use?
Yes. They are generated locally with your browser's cryptographic RNG (crypto.getRandomValues / crypto.randomUUID), the same source used for secure tokens. Nothing is uploaded, so the ids you see are yours alone and safe for production records.
Can UUIDs collide?
In practice, no. A v4 UUID has 122 random bits — you would need to generate billions of ids per second for many years to have a meaningful chance of a single collision. v7 keeps the same random tail plus a timestamp, so its collision odds are just as negligible.
Is this generator free and private?
Completely. There is no account, no limit and no upload — every id is produced in your browser and never sent anywhere. You can disconnect from the internet and it still works.