All Tools
Categories
Number Tools 158 XML Tools 64 Email Marketing Tools 55 Import-Export Tools 50 JSON Tools 45 Construction Real Estate tools 36 Text Tools 13 Shipping Freight Tools 5
About Contact Privacy

Random UUID Generator

Generate random UUID v4, UUID v7, ULID, and NanoID identifiers in bulk with format control, validation, and bulk export to CSV, JSON, SQL, or plain text. Includes version detection and timestamp extraction.

Identifier Type
Format
Live Preview
Export

About Random UUID Generator

Most applications need identifiers, and most identifiers should not be sequential. Sequential identifiers leak information about the size and growth of a system, become a bottleneck at scale, and create hot spots in B-tree indexes. A good random identifier solves all three problems, but choosing the right one - UUID v4, UUID v7, ULID, or NanoID - depends on what the identifier is for, what database it lives in, and what kind of queries will run against it.

Random UUID Generator produces all four formats in one place with full control over case, hyphens, brace wrapping, and output format. Set a count, pick the type, decide whether the output is uppercase or lowercase, with or without hyphens, in braces or not, and copy or download the result. The validator tab parses any list of identifiers and reports the type, version, and timestamp for each one.

Everything runs in your browser through a deterministic PRNG. The seed is optional - empty for fresh randomness on every load, set for a reproducible batch. Nothing is uploaded.

Features

  • Four identifier families: UUID v4 (fully random), UUID v7 (sortable), ULID (Crockford base32), and NanoID (URL-safe, customisable length and alphabet).
  • Bulk generation up to 10,000: Generate any number of identifiers in a single pass, from a handful to ten thousand.
  • Case and hyphen control: Uppercase or lowercase, with hyphens or as a single 32-character run, in curly braces, angle brackets, or square brackets for code snippets.
  • Custom NanoID alphabet and length: Restrict NanoID to digits, to uppercase only, or any custom character set; choose any length from 8 to 64.
  • Validation tab: Paste any list of identifiers and the tool detects UUID version, ULID structure, and NanoID length, and flags invalid values with a reason.
  • Timestamp extraction: For UUID v7 and ULID, the validator extracts the embedded millisecond timestamp and reports it as a UTC date.
  • Optional seed: Reproducible batches for testing - same seed, same identifiers, every time.
  • Four export formats: CSV (one per row), JSON (array of objects with type, value, timestamp), SQL INSERT statement, and plain text.
  • Filter the output: Search the full list by any substring of the identifier or the timestamp.
  • No upload, no account: Everything happens in your browser; nothing leaves the page.

How to Use

  1. Pick a type. UUID v4 for general-purpose random identifiers, UUID v7 for time-sorted ones, ULID for compact sortable identifiers, or NanoID for short URL-safe strings.
  2. Set the count. How many identifiers to produce in this batch.
  3. Set NanoID length and alphabet if relevant. Length defaults to 21, alphabet to A through Z, a through z, 0 through 9, underscore, and minus.
  4. Set a seed if reproducibility matters. Empty for fresh randomness; a non-empty value pins the output to that seed.
  5. Pick a format. Lowercase or uppercase, with or without hyphens, in braces or not.
  6. Choose an export format. CSV, JSON, SQL INSERT, or plain text - preview changes as you go.
  7. Copy or download the result. The right column holds the formatted output; the Output tab shows the full list with filters.
  8. Validate external identifiers (optional). Paste any list of UUIDs, ULIDs, or NanoIDs into the Validator tab for type detection and timestamp extraction.

Examples

Example 1 - Database primary keys. Switch to UUID v7 and generate 1,000 identifiers. The leading timestamp makes the values naturally sortable, so an ORDER BY id clause on a million-row table will return rows in insertion order without a separate created_at index.

Example 2 - Public-facing tokens. Use UUID v4 with no hyphens for opaque, URL-safe tokens. Each token is 32 characters of hex, which is impossible to guess and does not leak any information about the system.

Example 3 - Compact NanoIDs for short URLs. Switch to NanoID with length 12 and the default alphabet. Each identifier is 12 URL-safe characters and has about 71 bits of entropy, which is enough to make collisions effectively impossible at any realistic scale.

Example 4 - ULID for cross-language systems. Generate 500 ULIDs. The Crockford base32 encoding is case-insensitive and avoids the easily-confused characters I, L, O, and U, which makes ULIDs pleasant to read aloud and to transcribe.

Example 5 - Restricting NanoID to digits. Set the custom alphabet to 0-9 and length to 10. The result is a numeric PIN-style identifier suitable for one-time codes or short reference numbers.

Example 6 - Reproducing a failing test. Set a seed, generate the batch, and copy the seed into a comment in the test file. Re-running with the same seed produces the exact same identifiers, which makes flaky tests trivial to debug.

Example 7 - Validating existing identifiers. Paste a list of UUIDs and ULIDs mixed together into the Validator tab. The tool detects each type, the UUID version where applicable, and reports the timestamp for any UUID v7 or ULID. Invalid values are flagged with a reason.

Benefits

  • Stop hand-rolling identifiers in code: Generate hundreds or thousands in one click, in the exact format you need.
  • Pick the right primitive for the job: UUID v4 for opacity, UUID v7 for time ordering, ULID for compactness, NanoID for shortness.
  • Get the format right the first time: Case, hyphens, braces - every option is a click, and the preview updates instantly.
  • Validate on the way in: Detect what kind of identifier a string is and pull out the embedded timestamp before the data hits your application.
  • Reproducible for tests, fresh for production: The seed makes any batch repeatable; the absence of a seed uses high-entropy browser randomness.
  • Export the shape you need: CSV for spreadsheets, JSON for code, SQL for direct database loading, plain text for documentation.
  • Free and private: No account, no upload, nothing leaves your browser.

Frequently Asked Questions

What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit label used to identify information in computer systems. The most common version, v4, generates random values with so much entropy that the probability of a collision is effectively zero for any practical number of identifiers. UUIDs are written as 32 hex digits grouped into 8-4-4-4-12 segments separated by hyphens, for a total length of 36 characters.
What is the difference between UUID v4 and UUID v7?
UUID v4 is fully random across all 128 bits except for the version and variant fields, which is simple and well-supported but produces values that are not sortable by time. UUID v7 was standardised in RFC 9562 in 2024 and puts a 48-bit millisecond-precision timestamp in the leading bits, with the remainder filled with randomness. The result is a value that is still globally unique but naturally sorts in the order it was created, which makes it ideal for database primary keys and event logs.
What is a ULID?
A ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit value encoded as a 26-character Crockford base32 string. The first 10 characters are a millisecond timestamp and the remaining 16 characters are random. ULIDs sort the same way UUID v7 does, but the case-insensitive Crockford base32 encoding makes them easier to read aloud and faster to compare than hex UUIDs.
What is a NanoID?
NanoID is a tiny string identifier that uses a URL-safe alphabet (A through Z, a through z, 0 through 9, plus underscore and minus) and a configurable length. The default 21 characters provide about the same collision resistance as a UUID v4 in a much shorter string, which is useful when you need compact identifiers in URLs, database keys, or DOM attributes.
When should I use UUID v4 instead of UUID v7?
Use UUID v4 when the identifier needs to be opaque, when you want the absolute widest library support, or when the order in which identifiers are created is not meaningful. Use UUID v7 when you want identifiers that sort in creation order, for database primary keys, event sourcing, append-only logs, and anywhere that an ORDER BY id clause should reflect the insertion order.
Can I generate ULID and NanoID with custom alphabets?
ULID is fixed to Crockford base32 (the digits 0 through 9 and the letters A through Z minus I, L, O, and U) because the sortability and case-insensitivity properties depend on the alphabet. NanoID accepts a custom alphabet, which is useful for restricting the character set to digits only, to uppercase only, or to a custom set that avoids visually similar characters.
Are these identifiers cryptographically secure?
UUID v4 and UUID v7 use a cryptographically secure source of randomness in the browser through crypto.getRandomValues when available. The fallback PRNG used in this tool is fast and produces uniform distribution, but is not designed to resist an adversary observing the output. For secret tokens, session keys, or anything an attacker might be able to observe or replay, use dedicated cryptography tooling.
What does the variant nibble mean?
In any UUID, the high two bits of the 17th hex digit (the first digit of the 4-character group at position 19 in the dashed form) encode the variant. The standard RFC 4122 variant is 10 binary, which corresponds to the hex digits 8, 9, A, or B. The generator respects this rule, and the validator can confirm a UUID uses the standard variant.
Can I use these identifiers in URLs?
Yes. UUID v4 and UUID v7 with hyphens are valid in URLs, and the no-hyphen form is even shorter. ULIDs are 26 characters of Crockford base32 and are valid in URLs. NanoID is designed specifically for URL safety - its default alphabet excludes URL-reserved characters, so a NanoID is safe to drop straight into a path or query string without further encoding.
Can I validate identifiers generated elsewhere?
Yes - paste any list of UUIDs, ULIDs, or NanoIDs into the validator tab and the tool will detect the type, the version where applicable, and the timestamp where the format encodes one. Invalid identifiers are flagged with the reason.
What is the largest UUID value?
The 128-bit space allows for 2 to the power of 128 distinct values, which is approximately 3.4 times 10 to the power of 38. To put that in perspective, you would need to generate a billion UUIDs per second for about 100 years to have a 50 percent chance of a single collision. The same applies to ULIDs, since both use the full 128-bit space.
Does the seed make UUIDs predictable?
A seed makes the output of this generator deterministic, which is useful for testing, but it does not make the values predictable to an outside observer who does not know the seed. Real-world identifiers used in production should never be seeded; the seed field is provided so you can reproduce a specific batch when debugging.
How do I get a UUID v4 in the no-hyphen form?
Click the no-hyphen button in the Format section. The output is a 32-character string of lowercase or uppercase hex. Many databases and APIs prefer the no-hyphen form because it is shorter and avoids the need to escape hyphens in some contexts.
Why does the validator flag some valid identifiers as invalid?
The validator is strict. A UUID must have its version nibble (the first hex digit of the third group) set to a recognised value 1 through 8, and its variant nibble (the first hex digit of the fourth group) set to 8, 9, A, or B. Some systems generate non-standard UUIDs that are valid in their context but not strictly compliant, and those will be flagged. You can still use them; the flag is just information.