How to generate UUIDs
- Pick version 4 for fully random IDs or version 7 for time-ordered ones.
- Choose how many you need, up to 1,000 at a time.
- Set uppercase or drop the hyphens if your system expects it.
- Copy them or download a text file with one UUID per line.
UUID v4 vs v7
| Version 4 | Version 7 | |
|---|---|---|
| Made from | 122 random bits | 48-bit millisecond timestamp + 74 random bits |
| Sort order | Random | Order of creation |
| Database indexes | Scattered inserts | Append-friendly, faster inserts |
| Reveals creation time | No | Yes, to the millisecond |
Reading a UUID
A UUID is 128 bits written as 32 hexadecimal digits in five groups: 8-4-4-4-12. The first digit of the third group is the version (4 or 7), and the first digit of the fourth group is8, 9, a or b, marking the standard variant.
Common uses
- Seeding a test database. Generate up to 1,000 IDs at once and download them as a text file to fill test data, fixtures or a sample import.
- Unique IDs for spreadsheet rows. Give each row of a spreadsheet or CSV import a stable unique ID by pasting a column of UUIDs next to your data.
- A one-off ID while testing. Need an ID for a test request, a config entry or an idempotency key? Generate one and copy it with a click.