GUID / UUID Generator

Generate random UUID v4 identifiers instantly — one at a time or in bulk.

Generated UUIDs

    Generate Random GUIDs (UUID v4) Online

    This free online tool generates random version 4 UUIDs (also called GUIDs) — one at a time or hundreds at once. The version 4 layout is defined in RFC 4122, which RFC 9562 has since replaced without changing it. Use them as database primary keys, request IDs, or anywhere you need an identifier that is, for all practical purposes, unique without asking a central server.

    How It Works

    • Set a quantity (1–1000) and click Generate to create that many UUIDs at once. The page already shows 5 when it opens. A number above 1000 is lowered to 1000 with a message, and an empty or zero value becomes 1.
    • Formatting options — toggle hyphens, uppercase letters, or wrap each UUID in curly braces (the format some Windows APIs and .NET's Guid type expect). The options re-format the batch you already have, so ticking one does not create new UUIDs.
    • Copy individually using the Copy button next to any UUID, or Copy All to copy the whole batch, one per line.
    • Download the batch as a plain uuids.txt file, one UUID per line, in the current format.
    • Nil UUID replaces the list with the all-zeros UUID (00000000-0000-0000-0000-000000000000), often used as a sentinel "empty" value.

    Why UUID v4?

    UUID version 4 identifiers are generated from random bits rather than from a timestamp or hardware address, which means they carry no information about when or where they were created — a good default choice for most applications that just need a unique ID. This tool calls the browser's crypto.randomUUID(), which draws on the operating system's cryptographically secure random source. A browser without that function makes the tool build the UUID from crypto.getRandomValues() instead. Only a browser with no crypto object at all, which no current mainstream browser is, would make it fall back to Math.random(). Need lots of IDs as part of larger test records? The Mock Data Generator builds full JSON datasets with unique IDs, names, and emails.

    Anatomy of a UUID v4

    A UUID is 128 bits, written as 32 hexadecimal digits in groups of 8-4-4-4-12. In a version 4 UUID, 6 of those bits are fixed and the other 122 are random. Here is one the live tool produced, taken apart:

    GroupSizeContent
    e7ed4bde8 hex digitsrandom
    01ce4 hex digitsrandom
    4d624 hex digitsfirst digit is always 4: the version
    ad694 hex digitsfirst digit is always 8, 9, a or b: the variant
    3d218b0d459512 hex digitsrandom

    The fixed bits let any program recognise the version and variant. We generated 1,000 UUIDs in one batch with this tool and checked every one against that pattern: all 1,000 had a 4 in the version position, a variant digit of 8, 9, a or b (spread roughly evenly, 258, 222, 269 and 251 for 8, 9, a and b), and all 1,000 were different from each other.

    GUID Formats: Hyphens, Uppercase and Braces

    The same UUID can be written in several ways, and which one you need depends on the system that reads it. The table shows one UUID from the tool in each combination of the three options. All of them are the same 128-bit value, and most parsers accept the lowercase hyphenated form and ignore case.

    Options tickedThe same UUID
    Hyphens on, lowercase (default)e7ed4bde-01ce-4d62-ad69-3d218b0d4595
    UppercaseE7ED4BDE-01CE-4D62-AD69-3D218B0D4595
    Hyphens offe7ed4bde01ce4d62ad693d218b0d4595
    Hyphens off + braces{e7ed4bde01ce4d62ad693d218b0d4595}
    Uppercase + braces (hyphens on){E7ED4BDE-01CE-4D62-AD69-3D218B0D4595}

    The plain 32-digit form (N in .NET's format codes) is handy for filenames and some database columns, and the braced form (B) is common in Windows and COM contexts. Storing the 16 raw bytes instead of the 36-character text, where the database supports it, saves more than half of the space per ID.

    How Likely Is a Collision? The Numbers

    With 122 random bits there are about 5.3 × 1036 possible version 4 UUIDs. The chance that any two in a set are equal follows the birthday formula, about n² divided by twice that number. For a few sizes (calculated, not simulated):

    UUIDs generatedChance that at least two are equal
    1 million (106)9.4e-26
    1 billion (109)9.4e-20
    1 trillion (1012)9.4e-14
    1 quadrillion (1015)9.4e-08
    1 quintillion (1018)9%

    You would need to generate roughly 1.0 × 1014 UUIDs for the chance of one duplicate to reach one in a billion, and about 2.7 × 1018 to reach even odds. That is only true if the random source is good, which is why the tool uses the browser's secure generator. In practice, a duplicate UUID almost always means a bug (copying a value, seeding a test with a fixed one) and not bad luck.

    UUID or Auto-Increment ID?

    An auto-increment integer is small (4 or 8 bytes), sorts by creation order, and is easy to read in a log. A UUID is 16 bytes, but it can be created anywhere without coordination: in the browser, in a mobile app while offline, or in several services at once. That makes merging databases, importing data from another system and creating a record and its children before saving much easier. UUIDs also do not reveal how many records you have or let a visitor guess the next one by adding one to a number in the URL, although you still need proper access checks, because an unguessable ID is not the same as permission.

    There is a cost. Fully random version 4 keys are inserted at random places in a database index, which can slow writes and fragment a large table compared with an increasing key. Time-ordered UUIDs (version 7 in RFC 9562) were designed to fix that; this tool generates version 4 only.

    When Not to Use a UUID

    • As a secret. A UUID identifies something. Anyone who sees it can use it. For a password-reset link or API key, use a dedicated token generator and store it as a secret.
    • When people must read or type it. Thirty-six characters is a poor invoice number or support code. Use a short, human-friendly reference next to the UUID.
    • When you need ordering. A random UUID tells you nothing about which came first. Keep a timestamp column or use a time-ordered scheme.
    • For a small, single-database table where a plain integer key is simpler, smaller and faster to join.
    • When you need the same ID for the same input. Version 4 is random every time; name-based versions (such as version 5) are not offered here.

    Privacy

    All UUIDs are generated entirely in your browser using JavaScript's Web Crypto API. Nothing is sent to a server, and nothing about the generation process is logged.

    UUID Generator — Options Explained

    A UUID is a 128-bit identifier, usually written as 32 hexadecimal digits in five hyphen-separated groups. Here's what each formatting option on this page controls.

    Hyphens

    Standard UUIDs use the format 8-4-4-4-12 hex digits separated by hyphens. Turn this off to get a compact 32-character hex string with no separators, useful for some database column formats.

    Uppercase

    UUIDs are conventionally lowercase, but some systems (older Windows APIs, certain SQL dialects) expect uppercase hex digits. This toggle switches the letters A–F to uppercase.

    Braces

    Wraps each UUID in { }, matching the string format .NET's Guid.ToString("B") and some COM/Windows Registry contexts use.

    Bulk Generation

    Generate up to 1000 UUIDs in a single click — useful for seeding test data, generating sample IDs for a fixture file, or pre-allocating identifiers for a batch import.

    Who Uses This Tool?

    Backend Developers

    Generate primary keys for database records, correlation IDs for distributed tracing, or unique tokens for one-off use cases.

    QA & Test Engineers

    Quickly generate a batch of unique IDs to seed test fixtures or populate mock data for automated tests.

    DevOps & SREs

    Generate request or trace IDs for manual testing of logging and observability pipelines.

    App & API Developers

    Get a quick, collision-free identifier for a new resource, API key, or session while prototyping — no need to open a REPL.

    Frequently Asked Questions

    What is a UUID?

    A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information, typically written as 32 hexadecimal digits in five groups separated by hyphens (e.g. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). "GUID" (Globally Unique Identifier) refers to the same format, mainly in Microsoft contexts.

    Can two generated UUIDs collide?

    Practically, no. UUID v4 has 122 random bits, giving roughly 5.3 x 10^36 possible values — the odds of ever generating a duplicate are astronomically small. You would need about 10^14 UUIDs for a one-in-a-billion chance of a single duplicate.

    What's the difference between UUID and GUID?

    They refer to the same underlying format. "UUID" is the term used in the RFC 4122 standard and most Unix/web contexts; "GUID" is Microsoft's name for the identical concept, used throughout Windows and .NET APIs.

    Is this a cryptographically secure random source?

    Yes. This tool uses the browser's crypto.randomUUID() (or crypto.getRandomValues() as a fallback), both backed by the operating system's cryptographically secure random number generator. Only a browser with no crypto object at all would make it fall back to Math.random().

    Is anything sent to a server?

    No. All UUIDs are generated entirely in your browser with JavaScript. Nothing is sent to a server, and generated values are not logged anywhere.

    Which UUID versions does this tool generate?

    Only version 4, the random one. It does not generate time-based versions (1, 6 or 7) or name-based versions (3 or 5). The only other value it can insert is the all-zeros nil UUID.

    Is a UUID safe to use as a secret token?

    Not by itself. A version 4 UUID is random and hard to guess, but it is designed as an identifier. Anyone who sees it can use it, and it is often logged and shown in URLs. For passwords, reset links and API keys, use a dedicated secret generator and treat the value as confidential.

    Should I use a UUID or an auto-increment ID?

    Use a UUID when records are created in several places, offline, or before they are saved, or when you do not want guessable IDs. Use an auto-increment integer for a small single-database table where a short, ordered key is simpler and faster. Random UUIDs make a large index less compact than sequential keys.

    Can I use these GUIDs in C# or SQL Server?

    Yes. The default output (lowercase, with hyphens) is the 36-character form that .NET's Guid.Parse reads as format "D" and that SQL Server accepts when you convert a string to uniqueidentifier. Guid.Parse also reads the 32-digit form without hyphens ("N") and the braced form with hyphens ("B"), and the Guid(String) constructor documents that the hex digits can be uppercase or lowercase. If you tick Braces, keep Hyphens on: the braced format .NET documents includes the hyphens.

    Related Tools

    Built by Deepak Kumar — a developer who wanted a JSON tool that respects your privacy. All processing happens in your browser. Your data never leaves your device.