UUID Generator - Real Random UUID v4

Generate real, cryptographically random UUID v4 values using your browser's built-in secure random number generator - not a weaker pseudo-random substitute.

Generate and Validate UUIDs

READY — Secure, browser-local UUID generation.

Generate secure UUID v4 identifiers or optional RFC 9562 UUID v7 timestamps. The default remains v4. Nothing is uploaded by this tool.

GENERATED0
VERSIONv4
IN-BATCH DUPLICATES—

Generated UUIDs

SECURE RANDOM

UUID v4 uses cryptographic randomness; there is no mathematical guarantee of universal uniqueness.

UUID Format Validator & Inspector

LOCAL CHECK

Paste a UUID to check its syntax, version and variant. For v7, inspect the timestamp stored in its first 48 bits. This cannot prove an ID is unique or was generated securely.

Enter a UUID and choose Validate UUID.

Privacy & limits: Random bytes come from browser Web Crypto. UUID v7 embeds a browser-clock millisecond timestamp; random v7 IDs made within the same millisecond are not guaranteed to be lexically increasing. Generating, inspecting, and preparing files happen locally; downloads and clipboard copies require a user action. A UUID is an identifier, not an authentication secret.

★ ★ ★ ★ ★
No ratings yet — be the first

What Is a UUID Generator?

A UUID generator creates 128-bit Universally Unique Identifiers in a widely used, recognizable text form such as c4b4b840-8e89-44a1-a78b-23e61a6b8c03. The default UUID v4 generator draws from a cryptographically secure browser random source, with 122 randomly generated bits after the version and variant fields are set. UUIDs are practical identifiers for database rows, software records, test fixtures and integration payloads. Collisions are extremely unlikely when correctly generated, but no UUID generator can prove global uniqueness.

This upgrade also offers optional UUID v7 as defined by RFC 9562. UUID v7 places the browser-clock Unix epoch timestamp in its first 48 bits and fills the remaining available 74 bits with cryptographically secure random data. This can make UUIDs broadly time-sortable across distinct timestamps. The v7 generator does not implement a monotonic counter, so UUIDs produced in the same millisecond are not guaranteed to increase in generation order.

How to Use the UUID Generator

  1. Select a UUID version: leave the default UUID v4 for random identifiers, or choose UUID v7 when an embedded timestamp and general time-based ordering are useful. v7 is not a time-authentication mechanism.
  2. Set the batch size: enter a whole number from 1 to 100. Click Generate UUID to produce a fresh batch locally. The generator checks for duplicate values within this batch, without claiming worldwide uniqueness.
  3. Choose an output format: canonical lowercase, uppercase, compact 32-hex-character form, braces, or urn:uuid:. Changing this setting reformats the existing IDs; it does not regenerate them or change their underlying bytes.
  4. Copy or download: copy a single row or choose Copy All. Export your batch as plain text, JSON or CSV with the respective download buttons. Clipboard access and saving depend on your browser; no automatic server upload is performed.
  5. Validate a UUID: paste a canonical or alternate-form UUID into the inspector and press Validate UUID (or Enter). Check its hexadecimal layout, version, variant, and for v7 its encoded UTC millisecond timestamp. This is a format check, not a cryptographic quality test.
  6. Start again: use Reset to clear the batch and inspector, or Generate UUID again for new values. If secure browser randomness is unavailable, the tool shows an error rather than falling back to Math.random().

How It Works

For UUID v4, the tool prefers the browser's crypto.randomUUID() method. If the convenience method is absent or unusable, it can obtain 16 cryptographically secure bytes from crypto.getRandomValues() and set the version nibble to 4 and the RFC variant bits to 10. A UUID v4 has 122 random bits. The result is formatted into the canonical eight-four-four-four-twelve hexadecimal pattern. Generation fails explicitly when there is no usable secure source.

For UUID v7, the generator obtains a fresh 16-byte secure random buffer and writes the current Date.now() Unix epoch millisecond value into the leading 48 bits in network byte order. It sets the version nibble to 7 and the RFC variant bits to 10; the other 74 bits remain random. Since no cross-call counter is used, the v7 results are not strictly monotonic inside the same millisecond or across clock adjustments. The validator parses the text locally, checks its structure and fields, and extracts the first 48 bits of an RFC-layout v7 value as a UTC timestamp.

Understanding Your Results

  • UUID v4: a 36-character canonical value has a 4 at the beginning of the third group; in an RFC UUID, the first hex character of the fourth group is 8, 9, a or b.
  • UUID v7: the version nibble is 7, the variant remains RFC-compatible and the first 48 bits hold Unix epoch milliseconds derived from the current device clock. Clock errors carry into the value.
  • In-batch duplicates: the count compares the generated strings in the current batch only. A zero result does not guarantee values have never been used elsewhere. The tool does not try to compare against a global database.
  • Export formats: uppercase, compact, braces and URN are presentation choices for the same underlying 128 bits. JSON includes generation version, format and the displayed ID list; CSV includes row index and UUID.
  • Inspector: a syntactically valid hexadecimal value can contain a nonstandard or reserved version/variant. A format pass does not mean that the UUID is unique, unpredictable, issued by a trusted service or safe to use as an access token. All-zero Nil and all-ones Max UUIDs are labeled as special cases rather than ordinary generated identifiers.

Browser Limitations

crypto.randomUUID() is generally a secure-context API; browsers that lack it may still expose crypto.getRandomValues(). The tool uses secure bytes for both variants and intentionally provides no weaker pseudo-random fallback. Clipboard writing usually requires a secure context, permission or user activation. Downloads are browser-controlled and may be blocked by browser policy or sandboxing. The v7 timestamp follows the current device clock, which may be wrong or adjusted and is not a trustworthy proof of creation time. Generation and validation occur locally in the widget; the surrounding website may independently serve its normal assets and analytics.

Common Mistakes to Avoid

  • Confusing UUID v4 with UUID v7: v4 is random; v7 includes a millisecond timestamp plus random data. Pick according to your database and application requirements, not merely the number of characters.
  • Assuming every v7 batch is strictly sorted: two values generated in one millisecond may appear out of order; this implementation does not provide a monotonic sequence or a cross-device ordering guarantee.
  • Assuming 100 generated UUIDs prove no collisions are possible: the in-batch collision check is a local smoke test, not a guarantee about all historic IDs or future generations.
  • Using UUIDs as authentication secrets: UUIDs are identifiers. Authorization decisions must not depend solely on someone possessing an identifier, even if it looks random.
  • Mixing display formats without checking software expectations: compact, brace and URN forms represent the same UUID but some APIs accept only canonical hyphenated values.
  • Confusing format validity with secure generation: any program can write a correctly formatted identifier; the inspector cannot verify which random source was used.

Frequently Asked Questions

What makes this a "real" UUID rather than a fake one?

The default v4 path uses crypto.randomUUID() or securely generated bytes from crypto.getRandomValues(), with the correct version and variant bits. Optional v7 follows RFC 9562's 48-bit timestamp and 74-bit randomness layout. Correct structure matters, but a well-formatted UUID by itself cannot prove the quality of the source that produced it.

Can two generated UUIDs ever collide (be identical)?

Yes, in principle. UUID v4 has 122 random bits, so accidental collisions are extremely unlikely when a secure random source is used. UUID v7 has timestamp information plus 74 random bits; the same timestamp can be shared by multiple IDs. The interface only checks duplicates inside each generated batch.

Are UUIDs generated here suitable for use in a real application?

UUID v4 and v7 outputs follow RFC field layouts and are appropriate as ordinary identifiers when your application accepts that version. Your software must still enforce uniqueness where necessary, use proper authorization and consider that v7 timestamps reveal approximate generation time according to the source clock.

Is any generated UUID logged or stored by this tool?

The generator runs in your browser and does not submit generated UUIDs or inspection input to a tool endpoint. Values remain in the current page until you replace, reset or close them; clipboard and downloaded exports happen only when you initiate them. The wider website may load its usual resources and analytics.

What's the difference between UUID versions, like v4 versus v1?

UUID v4 uses cryptographically generated random bits. Older v1 combines a time value with node-related information, which may introduce privacy considerations. RFC 9562's v7 embeds Unix epoch milliseconds with random bits to make IDs broadly time-sortable. This generator offers v4 by default and optional v7, not v1.

Conclusion

Generate secure default v4 UUIDs or RFC 9562 v7 identifiers, export a batch in your required form, and check imported UUID text using the built-in inspector. This tool is intended for creating and examining identifiers, not proving uniqueness or authenticating users. For other encoding tasks, see the Base64 Encoder/Decoder.