UUID / GUID Generator
FREE TOOL · NO SIGN-UP
This UUID generator creates random version 4 UUIDs or time-ordered version 7 UUIDs, from one to a thousand at a time. Choose the version, set how many you need, pick a format and click Generate to get a list you can copy or download. Developers use it for database keys, test data, API requests and config files, and every ID is created in your browser with a cryptographic random source.
What a UUID Is
A UUID, or universally unique identifier, is a 128-bit value used to label something so that no other system is likely to ever use the same label. The current standard is RFC 9562, published in 2024, which replaced the older RFC 4122.
Structure of the 36 characters
A UUID is usually written as 32 hexadecimal digits split into five groups by hyphens: 8-4-4-4-12, which makes 36 characters in total. For example: 0190f3a2-7c1e-7b3d-9a4f-2e6c1d8b5a70.
Two parts of that string carry meaning. The first digit of the third group is the version, so a 4 means v4 and a 7 means v7. The first digit of the fourth group holds the variant, which for standard UUIDs is always 8, 9, a or b. Everything else is either random data or, for time-based versions, a timestamp mixed with random bits.
UUID vs GUID
GUID stands for globally unique identifier. It’s the name Microsoft uses, especially in Windows, .NET and SQL Server. In practice, a GUID and a UUID are the same thing and use the same format. GUIDs are often shown in uppercase and sometimes wrapped in curly braces, like {3F2504E0-4F89-41D3-9A0C-0305E82C3301}, which is why this generator offers both options.
How to Generate UUIDs
Step 1 – Pick version
Choose UUID v4 (random) for general-purpose IDs, or UUID v7 (time-ordered) when the IDs will be used as database keys or need to sort by creation time.
Step 2 – Set quantity
Enter how many you need in How many, from 1 to 1,000. The default is 10. Large batches are useful for seeding test databases or preparing import files.
Step 3 – Choose format
Tick Uppercase for capital letters, keep Hyphens on for the standard 36-character format or turn them off for a compact 32-character string, and tick Wrap in braces {} for the GUID style used in some Microsoft tools. Then click Generate UUIDs.
Step 4 – Copy or download
The list appears one UUID per line. Click Copy to grab them all, or Download to save a uuids.txt file. Click Generate again for a fresh batch.
UUID Versions Explained
v1, v4, v7 and others
RFC 9562 defines several versions, each generated differently:
- v1: based on a timestamp and the machine’s MAC address. Sortable-ish, but it can reveal when and where it was created.
- v3 and v5: created by hashing a namespace and a name, using MD5 and SHA-1 respectively. The same input always gives the same UUID.
- v4: made of random bits, apart from the version and variant digits. The most widely used version.
- v6: a reordered v1 that sorts by time.
- v7: a Unix timestamp in milliseconds followed by random bits. Sortable and privacy-friendly.
- v8: a custom format for vendor-specific needs.
Which one to choose
For most uses, choose v4. It’s simple, supported everywhere and reveals nothing about when or where it was made. Choose v7 when IDs will be stored as primary keys or indexed in a database, or when you want IDs that sort in creation order. Use v5 when you need the same ID every time for the same input, such as a URL. This tool generates v4 and v7.
UUIDs as Database Keys
Index fragmentation with v4
Many databases store primary keys in a B-tree index ordered by value. Random v4 UUIDs land in random spots in that index, so each insert can touch a different page. On large, write-heavy tables this leads to page splits, fragmented indexes and more memory and disk activity than sequential keys would cause.
Why v7 helps
A v7 UUID starts with a millisecond timestamp, so new IDs are larger than older ones and get added near the end of the index, much like an auto-increment number. You keep the benefits of UUIDs, such as generating IDs anywhere without a central counter, while avoiding most of the random-insert cost. The trade-off is that a v7 ID reveals roughly when it was created.
Generating UUIDs in Code
JavaScript, Python, C
- JavaScript: modern browsers and Node.js provide
crypto.randomUUID()for v4. - Python:
import uuidthenuuid.uuid4(). Recent Python versions also add newer versions; check your version’s documentation for v7. - C# / .NET:
Guid.NewGuid()creates a random GUID, and newer .NET releases include a method for v7.
SQL functions
PostgreSQL offers gen_random_uuid() for v4, SQL Server uses NEWID() and NEWSEQUENTIALID(), and MySQL has UUID(), which returns a v1 value. Support for v7 is arriving in newer database versions, so check your release notes.
UUID Mistakes
Using UUIDs as secrets
UUIDs are identifiers, not passwords or tokens. v7 contains a readable timestamp, and some generators don’t use a secure random source. For session tokens or reset links, use a dedicated secure token generator.
Storing as text vs binary
Stored as a 36-character string, a UUID takes more than twice the space of its 16-byte binary form. Use your database’s native UUID type where one exists.
Custom “UUIDs” that break the spec
Home-made IDs with wrong lengths, missing version digits or non-hex characters can fail validation in libraries and databases. Stick to standard versions.
Get Unique IDs in One Click
Generate one ID for a config file or a thousand for test data, all in the standard UUID format. If you’re preparing data for code, escape strings with JSON / String Escape & Unescape, create checksums with the MD5 Hash Generator and wrap ID lists in quotes with Add Prefix / Suffix to Lines. Browse more free developer and SEO tools in the FHSEO Hub free SEO tools collection.
