Skip to content

UUID Generator

Generate UUID v4 (random) or v7 (sortable, time-based) — up to 1,000 at once.

Version
How many
0 UUIDs

    What this tool does

    A UUID (RFC 9562) is a 128-bit identifier you can mint locally without coordinating with a server — it’s essentially guaranteed to be unique. This tool generates UUID v4 (random) for general use and UUID v7 (timestamp-prefixed) for database keys where sortability matters. Generation happens entirely in your browser via the platform Web Crypto API.

    How to use it

    Pick a version, pick how many you need (1, 10, 100, or custom), and click Generate. Copy the lot with one click, or download as a text file.

    v4 example:

    f47ac10b-58cc-4372-a567-0e02b2c3d479

    v7 example (the first 48 bits are the Unix-ms timestamp — this one was minted on 2024-07-04 at 14:23 UTC):

    0190b3ac-3e80-72f8-9a7e-1d4b6e5f8c21

    Limits and edge cases

    • v4 is purely random. Each UUID is independent — excellent for distribution, terrible for B-tree indexes (every insertion lands in a random page).
    • v7 is timestamp-prefixed. Lexicographic sort matches creation time, which keeps DB indexes packed. Trade-off: the first 48 bits leak when each ID was created (visible to anyone who sees the UUID).
    • Use RFC 9562 for the full spec. v1/v3/v5/v6/v8 exist but are rarely the right pick today.
    • Both versions use 128 bits, written as 32 hex digits with hyphens at positions 8/12/16/20.

    Frequently asked questions

    v4 or v7 — which should I use?
    v4 for anything not stored in a sorted index — request IDs, session tokens, file names. v7 for database primary keys, especially in B-tree systems (PostgreSQL, MySQL, SQLite) where random IDs cause write amplification.
    Is the output cryptographically random?
    Yes. Both v4 and v7 use crypto.getRandomValues / crypto.randomUUID, which the browser backs with a CSPRNG. Not just Math.random().
    Is anything sent to a server?
    No. Generation happens entirely in your browser via the Web Crypto API; the page never uploads anything.
    Why is v7 sortable?
    The first 48 bits are the Unix millisecond timestamp at creation time. UUIDs minted later sort after UUIDs minted earlier as plain strings — no special index needed.
    Can I generate a lot at once?
    Up to 1,000 per click. For more, repeat the action or script against the UUID lib directly.
    Are v4 collisions possible?
    Mathematically yes, practically no. 122 bits of entropy means you'd need to generate ~2.7 quintillion v4 UUIDs to have a 50% chance of a single collision.