UUID Generator

Generate version 4 or time-ordered version 7 UUIDs in your browser, in the four formats systems ask for, from the browser's own randomness.

Enable JavaScript to customise; default output below.

Version

4 is random. 7 starts with a millisecond timestamp, so the ids sort by creation time.

Format

Hyphenated is the standard form. Braces are a Microsoft convention, urn is the RFC's URI form.

More options Show
Live preview uuids.txt
generated-in-your-browser

Output is valid and updates as you type.

Generate UUIDs in your browser, from the browser’s own randomness. Version 4 when you want random, version 7 when you want them to sort.

How to use

  1. Pick the version. 4 is 122 random bits. 7 begins with a 48-bit millisecond timestamp, so the ids sort by creation time.
  2. Set how many you need. Up to five hundred at a time.
  3. Pick the format. Hyphenated is standard; plain drops the hyphens; braces are a Microsoft convention; urn is the RFC’s URI form.
  4. Copy the list. New values are generated in your tab on every change, so nothing is shared with anyone else who visits the page.

Example

018fd0c4-5c6f-7a3e-8b1e-3d6f7a2c9e10
018fd0c4-5c6f-7fb2-9c07-8a1d5e4b6f22
018fd0c4-5c70-7c41-a5d8-9f2e1b7c4a03

Those are version 7, generated within a millisecond or two of each other. The shared prefix is the timestamp, which is what makes them sort in creation order as plain strings.

Pitfalls

  • Version 4 as a primary key fragments a B-tree index, because each insert lands in a random place. Version 7 was added for exactly this reason.
  • Version 7 leaks a creation time to anyone holding the id. That is usually harmless and occasionally not.
  • A UUID is not a secret. It is unique, not unguessable in any security sense, and 122 bits of randomness in a v4 does not make it an access token.
  • Storing a UUID as a 36-character string costs more than twice the space of the 16 bytes it is. Use a binary or native uuid column where the database has one.
  • The nil UUID, all zeros, is a valid value that means “none”. Some systems treat it as a missing value, some as a real id.
  • Uppercase and lowercase UUIDs are the same value. The RFC says output lowercase and accept either, which is why comparing them as strings can fail.
  • Version 1 is based on a MAC address and a clock, and is not offered here: it identifies the machine that generated it.
  • Generating UUIDs in a loop on the server is fine; generating them in a browser and trusting them as unique across clients is fine too. What is not fine is generating them from a seeded pseudo-random source.

Compatibility

Version 4 and version 7 are both defined by RFC 9562, which replaced RFC 4122 in 2024. Version 7 is supported by PostgreSQL 18, MySQL through a function, and every current language runtime; where it is not, the string form works anyway because the format is unchanged. Randomness comes from crypto.getRandomValues, available in every browser since 2014 and in Node from 16. The page generates values in your tab: the server-rendered default is a placeholder, never a real UUID, so no two visitors get the same one.

Frequently asked questions

Version 4 or version 7?
Version 7 for database keys and anything sorted by time. Version 4 when you specifically do not want the creation time visible.
Are these cryptographically random?
The random bits come from the browser’s cryptographic generator. That does not make a UUID a secret: its purpose is uniqueness, not unguessability.
Will two people get the same UUID?
Not in practice. Version 4 has 122 random bits; version 7 has 74 plus a millisecond timestamp.
Can I use one as a filename?
Yes, the hyphenated form is filesystem-safe everywhere. The braced form is not, on some systems.
Why does the page show a placeholder before it loads?
Because the server cannot generate your UUID without handing the same one to everybody. The browser fills it in immediately on load.
Weekly drops

New tools, when there are new tools

One email when something worth using ships. No schedule to fill, so no filler.

Your address goes nowhere else, and one click unsubscribes.