UUID Generator
Generate cryptographically random UUID v4 identifiers in batch or single.
Client-Side Execution & Privacy Guarantee
This utility executes 100% locally in your web browser. Your inputs, tokens, queries, and data payloads are never transmitted to any external server or backend.
A UUID is a 128-bit value designed to be unique across space and time without central coordination. The most common versions today are v4 (purely random) and the newer v7 (time-ordered with randomness). Version 1 embeds a timestamp and a node identifier.
This tool produces correctly formatted strings for any of those versions. You can request a single ID or a batch, and you can choose the canonical hyphenated form or the compact hexadecimal form.
Version differences
Version 4 fills 122 of the 128 bits with cryptographically strong random data; the remaining bits are fixed to indicate the version and variant. Collisions are vanishingly unlikely for any practical number of IDs.
Version 7 places a 48-bit Unix timestamp (milliseconds) in the most significant bits, followed by random data. The resulting IDs sort roughly chronologically, which improves B-tree index locality in databases. Version 1 uses an older timestamp format and a MAC address; it is rarely recommended for new systems.
Format and representation
The canonical string representation is 8-4-4-4-12 hexadecimal digits separated by hyphens, always lowercase. The tool can also emit the 32-character hex string without hyphens, which some storage systems prefer.
All versions set the variant bits correctly so that libraries in every language recognize the value as a UUID. The tool never produces the obsolete nil UUID or any other reserved value unless you explicitly request it.
Practical considerations for databases
Random v4 UUIDs as primary keys can cause index fragmentation on large tables. Time-ordered v7 UUIDs reduce that problem while still providing uniqueness. If your database supports a native UUID type, store the value in that type rather than as a string.
When generating many IDs at once, the tool uses a cryptographically secure random source. It does not rely on Math.random or other weak generators.
When to use this tool
- Creating primary keys for new database records
- Generating correlation IDs for distributed tracing
- Naming temporary files or object-storage keys
- Issuing idempotency keys for API requests
- Producing test data that must be unique
How to use the UUID Generator
- Select the UUID version (1, 4 or 7).
- Enter how many IDs you need (1–1000).
- Choose hyphenated or compact output.
- Click Generate.
- Copy individual IDs or the entire list.
- Paste into your application, migration or configuration.
- For v7, note that the timestamp portion reflects the moment of generation.
Worked examples
Single version-4 UUID
version=4 count=1 format=hyphenated
550e8400-e29b-41d4-a716-446655440000
Illustrative value; each generation produces a new random ID.
Three version-7 UUIDs (compact)
version=7 count=3 format=compact
018f2e3c4d5e7f708192a3b4c5d6e7f8 018f2e3c4d5e7f71a2b3c4d5e6f70819 018f2e3c4d5f7a02b3c4d5e6f708192a
Illustrative values. The first 12 hex digits encode the millisecond timestamp, the 13th digit is the version (7), and the rest is random.
Common mistakes and tips
- Prefer v7 for new database primary keys when the engine supports it.
- Store UUIDs in native binary or UUID columns, not as varchar, for space and speed.
- Never use a UUID as a secret; they are not designed to be unguessable beyond uniqueness.
- When debugging, the timestamp in a v7 UUID can be decoded to see approximate creation time.
- Generate batches in one call rather than looping if you need many IDs quickly.
Frequently asked questions
Are the generated UUIDs guaranteed unique?
Version 4 and version 7 rely on sufficient randomness that the probability of collision is negligible for any realistic volume. Version 1 uniqueness also depends on the node identifier not being reused.
Can I decode a version-7 UUID to get its timestamp?
Yes. The first 48 bits represent milliseconds since the Unix epoch. Many libraries and online tools can extract that value.
Why does version 1 include a MAC address?
The original design used the machine’s MAC address to guarantee uniqueness across hosts. Modern practice prefers random or time-ordered versions that do not leak hardware identifiers.
Does the tool produce uppercase hex?
No. The standard representation is lowercase. Uppercase is accepted by most parsers but is non-canonical.
What is the maximum batch size?
One thousand IDs per request. Larger quantities can be obtained by repeating the operation.