OnlineTextLab
Esc

UUID Generator

Random v4 or sortable v7 UUIDs in the format you need, up to 1,000 at a time.

Version
Format

5 UUIDs

Download

    Runs on your device. Your files and text are not uploaded.

    About UUID Generator

    You need an ID that nothing else will ever use, and you want it without asking a database for one. That could be a primary key for seed data, a correlation ID for a test, or a batch of fixture records. A few clicks gives you as many as you need, in the format your code expects: standard, uppercase, without hyphens, or wrapped in braces for Windows registry and .NET style values.

    The more useful decision is which version to use. Version 4 is entirely random and reveals nothing about when it was made. Version 7 starts with the current time, so new IDs sort after older ones, which databases handle far better as an index key. Switching between them here shows the difference straight away.

    How it works

    All randomness comes from crypto.getRandomValues, the browser's cryptographically secure generator. There is deliberately no fallback to Math.random: if a browser lacks the secure source, the tool fails with a message instead of producing predictable IDs. A version 4 UUID carries 122 random bits, with the other 6 bits fixed to mark its version and variant.

    A version 7 UUID, defined in RFC 9562, puts a 48-bit millisecond timestamp first and fills the rest with random bits. IDs made in different milliseconds sort by time. Within one millisecond they sort by those random bits, since this generator keeps no counter between calls. So a large batch made in one click is only roughly in order.

    How to use UUID Generator

    1. Under Version, choose v4 random or v7 time-ordered.
    2. Under Format, choose Standard, Uppercase, No hyphens or With braces.
    3. Set How many, from 1 to 1,000. Changing an option makes a new batch, and Generate new does so at any time.
    4. Press Copy beside one ID, Copy all for the list, or Download for a text file such as uuids-v4.txt.

    Real output from the generator

    Output
    v4 random:
    30bb50ce-4109-4947-8a42-3d72dd6864c3
    ea3da490-9609-4b0e-8b66-c90382dac851
    
    v7 time-ordered:
    01a1a06d-c103-715f-babe-81d1a9767e6b
    01a1a06d-c104-7c83-ae36-28b7dc27e244

    Each v7 pair shares its opening digits because those hold the time, and these two were made one millisecond apart. The digit after the second hyphen shows the version: 4 or 7.

    When it helps

    • Seeding a test database or fixture file with unique primary keys
    • Choosing v7 keys for a new table, so inserts stay close together in the index
    • Getting a one-off correlation ID to trace a request across logs
    • Making a list of IDs for a data import, downloaded as a text file

    Tips for a better result

    • Do not use v7 where the creation time should stay private, such as in a public link to a user's account. Anyone can read the timestamp from the ID.
    • Random v4 keys scatter inserts across a B-tree index, which can slow large tables. Time-ordered keys avoid most of that.
    • If you only need an ID inside a running program, call crypto.randomUUID() for v4. This page is for when you need values by hand.

    Good to know

    • Only versions 4 and 7 are offered. Older versions such as 1, which embeds a MAC address, and name-based versions 3 and 5 are not.
    • Batches stop at 1,000, and a larger number is reduced with a note.
    • A UUID is an identifier, not a secret. It is not a substitute for a session token or an API key.
    • Generated IDs are not recorded anywhere, so this page cannot check them against IDs you already use.

    Questions people ask

    Can two UUIDs ever be the same?

    In theory yes, in practice no. With 122 random bits, you would need to generate on the order of 2^61 version 4 IDs before a collision became likely.

    Should I pick v4 or v7 for a database key?

    For most new tables, v7, since time-ordered keys keep index inserts close together. Choose v4 when the ID is public and should not reveal when the record was made.

    Is a UUID the same as a GUID?

    Effectively, yes. GUID is the name Microsoft uses, often in uppercase or with braces, and the With braces and Uppercase formats cover those habits.

    Is the no-hyphens form still a valid UUID?

    It holds the same 128 bits, and many systems accept it, but the standard text form has hyphens. Check what your database column or parser expects.

    What to use next

    Learn more

    Last reviewed . Read our editorial policy.