UUID Generator (v4)
Generate UUID v4 values in your browser.
What this UUID generator does
This tool generates random version 4 UUIDs (universally unique identifiers) in your browser. Choose how many you need, from 1 to 20 at a time, click Generate, and copy the result. The values come from your browser's cryptographic random number generator and are created on your device.
It is for developers who need IDs for database records, API resources, test data and configuration files, and for QA engineers and data teams who need unique placeholder values quickly.
How to generate UUIDs
- Enter How many UUIDs you want. The default is 1; you can generate up to 20 at once (values outside 1–20 are adjusted automatically).
- Click Generate.
- Click Copy to copy the result.
- Click Generate again for a fresh set. Every click produces new random values.
What a UUID looks like
A UUID is a 128-bit value, written as 32 hexadecimal digits in five groups separated by hyphens, in the pattern 8-4-4-4-12. For example:
3f2b8c1e-9a4d-4f6b-8e2a-7c5d1b0a9e34
Two positions tell you what kind of UUID it is:
- The first digit of the third group is the version. For a version 4 UUID it is always 4.
- The first digit of the fourth group shows the variant. For standard UUIDs it is 8, 9, a or b.
The remaining 122 bits are random. UUIDs are case-insensitive, and lowercase is the usual way to write them.
UUID versions in brief
UUIDs are specified in RFC 9562 (published in 2024), which replaced the older RFC 4122. The versions you are most likely to meet are:
- Version 4 – random. The most widely used version and the one this tool generates.
- Version 7 – time-ordered: the first 48 bits hold a Unix timestamp in milliseconds and the rest is random. Because new values sort after older ones, version 7 is popular as a database primary key.
- Version 1 – based on a timestamp and a node identifier, historically the MAC address. RFC 9562 recommends version 7 instead of version 1 or 6 where possible.
- Versions 3 and 5 – derived from a namespace and a name using MD5 or SHA-1, so the same input always gives the same UUID.
"GUID" (globally unique identifier) is the name commonly used in Microsoft technologies for the same 128-bit format.
How unique is a random UUID?
With 122 random bits, there are 2^122 possible version 4 values, a number with 37 digits. Provided they are generated with a good random source, the chance of two ever colliding is so small that version 4 UUIDs can be created independently on different machines without coordination. That is exactly why they are useful in distributed systems.
Common use cases
- Primary keys or public IDs for database records.
- Identifiers for API resources, messages and events.
- Correlation or request IDs for tracing a request across services.
- Test data, fixtures and mock objects.
- Unique file names for uploads.
Tips and common mistakes
- A UUID is an identifier, not a secret. Don't use a UUID on its own as a password, API key or session token. Use a purpose-built token generator for secrets.
- Database index performance. Random version 4 keys are spread across the whole index, which can slow inserts in some databases at large scale. Time-ordered version 7 UUIDs avoid this.
- Store efficiently. Many databases have a native UUID type (for example PostgreSQL's uuid), which takes 16 bytes instead of 36 characters of text.
- Keep the format consistent. Pick lowercase or uppercase, with hyphens, and stick to it, especially if IDs are compared as strings.
- Need more than 20? Generate several batches, or use your programming language's built-in UUID function in a script.
Frequently asked questions
What is a UUID v4?
A version 4 UUID is a 128-bit identifier in which 122 bits are random and 6 bits mark the version and variant.
Can two UUIDs be the same?
In theory yes, in practice the probability for properly generated random UUIDs is negligible for almost any real-world system.
Is UUID the same as GUID?
Yes, GUID is the name used mainly in Microsoft ecosystems for the same 128-bit identifier format.
Are these UUIDs generated securely?
They are created in your browser with the Web Crypto API, which uses a cryptographically secure random source. They are not sent to our server.
Should I use UUID v4 or v7?
Use version 4 when you just need random unique IDs. Consider version 7 when IDs are database keys and you want them to sort by creation time.
Is a UUID case-sensitive?
No. Uppercase and lowercase hex digits represent the same value, though lowercase is the common convention.
Related tools
- Password Generator – create random secrets and passwords.
- SHA Hash Generator – create SHA-256 and SHA-512 hashes.
- Unix Timestamp Converter – convert the timestamps used in time-based IDs.
- JSON Formatter – format test data that contains your IDs.