UUID Generator
Generate random UUIDs — version 4 for general use, or version 7 for time-ordered identifiers that index efficiently in a database. Produce one or a thousand at a time, all locally.
- Files never leave your device
- Free, no signup
- No watermarks
- Works offline once loaded
How to uuid generator
- 1
Choose a version
v4 for general random IDs, v7 when the IDs will be database primary keys.
- 2
Set how many
Generate anything from one to a thousand at a time.
- 3
Copy or download
Copy the list to your clipboard or download it as a text file.
What a UUID is actually solving
A UUID is a 128-bit identifier designed to be generated independently by any number of separate systems, at any time, with no central coordinating authority handing out the next available number, while still having an overwhelming statistical guarantee that no two generated values will ever collide. This is fundamentally different from an auto-incrementing integer ID, which requires a single database to track and hand out the next number in sequence — a UUID can be generated on a phone with no network connection, in a serverless function, or across a thousand parallel microservice instances simultaneously, with no coordination between them required at all, because the sheer size of the number space makes an accidental collision astronomically unlikely regardless of how many are generated independently.
Why v4 and v7 are both "random" but solve different problems
UUID version 4 fills essentially the entire 128 bits with cryptographically random data, which makes each generated value completely unpredictable and gives no clue whatsoever about when it was created or in what order relative to any other v4 UUID — exactly the property wanted for something like a security token, where predictability itself would be a vulnerability. UUID version 7, standardised far more recently in RFC 9562 (2024), deliberately sacrifices some of that opacity: it places a millisecond-precision timestamp in the leading bits, so a v7 UUID generated later always sorts after one generated earlier, while the remaining bits stay random and just as unguessable as v4's. The two are not competing designs where one is simply "better" — they trade the same underlying randomness for a different property depending on whether ordering or uniform unpredictability is what actually matters for a given use case.
Why a database with random primary keys gets slower as it grows
A database index backing a primary key is typically stored as a B-tree, a structure that performs best when new values are inserted at or near the end of the existing sorted order — which is exactly how a traditional auto-incrementing integer key behaves. A UUID v4 primary key, being uniformly random, inserts at an effectively random position within that sorted structure every single time, which forces the database to repeatedly split and rebalance index pages scattered throughout the tree rather than simply appending to the end. At small scale this overhead is invisible; at scale, with millions of rows, it becomes a genuine and measurable source of index fragmentation and slower writes — the exact problem UUID v7's leading timestamp was standardised specifically to solve, since it lets a UUID keep unique, unguessable IDs while still inserting in roughly sequential order.
Frequently asked questions
What is the difference between UUID v4 and v7?
v4 is entirely random. v7 puts a millisecond timestamp in its leading bits, so IDs generated later sort after earlier ones. Both are equally unguessable in practice; v7 simply also happens to be ordered.
Which should I use for a database primary key?
v7. Random v4 keys scatter inserts across the whole B-tree index, which fragments it and slows writes badly at scale. v7 keys append in order, so inserts stay sequential — this is the reason v7 was standardised in 2024.
Can two UUIDs ever be the same?
Mathematically possible, practically not. A v4 UUID has 122 random bits; you would need to generate about 2.7 × 10^18 of them before a collision becomes likely. For comparison, that is more UUIDs than there are grains of sand on Earth.
Are these generated securely?
Yes. They use `crypto.getRandomValues`, your operating system's cryptographic random source, not `Math.random`. This matters if a UUID is ever used as a capability token — a share link, an unsubscribe URL, a password-reset key.
Are UUID and GUID the same thing?
Yes. GUID is Microsoft's name for the same 128-bit identifier. The only difference you will encounter is formatting: Microsoft tooling often wraps them in braces and uses uppercase, both of which this tool can produce.
Common uuid generator tasks
You might also need
Password Generator
Create strong random passwords and passphrases
JWT Decoder
Decode and inspect JSON Web Tokens
QR Code Generator
Create QR codes for links, text, WiFi and more
Barcode Generator
Code 128 barcodes as scalable SVG
Color Picker & Converter
HEX, RGB, HSL, CMYK and contrast checking
Invoice Generator
Create and download a professional invoice as a PDF
Resume Builder
Build a clean, ATS-friendly resume and download it as a PDF