DevTools Logo

UUID Generator

UUID Generator (v4, v7, v1, v3, v5)

Professional UUID generation, validation, and analysis with support for all UUID versions.

Generator Settings

Timestamp-based with MAC address

Name-based using MD5 hash

Random or pseudo-random

Name-based using SHA-1 hash

Time-ordered with Unix millisecond timestamp

    Examples

    Single UUID version 4

    Output
    550e8400-e29b-41d4-a716-446655440000

    A random 128-bit identifier in the canonical 8-4-4-12 hex layout, ready to use as a database key or resource ID.

    Bulk generate (3)

    Input
    Version: v4  ·  Count: 3
    Output
    a1b2c3d4-e5f6-7890-abcd-ef1234567890
    01234567-89ab-cdef-0123-456789abcdef
    fedcba98-7654-3210-fedc-ba9876543210

    Generate many at once to seed a test database or fixture — every value is independently unique.

    Uppercase, no hyphens

    Input
    Version: v4  ·  Uppercase  ·  No hyphens
    Output
    A3F2B8C14D5E6F7A8B9C0D1E2F3A4B5C

    Match a storage or code convention that wants a flat, uppercase 32-character hex string.

    About this tool

    This generator creates UUIDs in all five standard versions: v4, v7, v1, v3 and v5. Version 4 draws 122 random bits from the browser's crypto random source, version 7 embeds a Unix millisecond timestamp so values sort chronologically, and versions 3 and 5 derive a deterministic identifier from a namespace plus a name — MD5 for v3, SHA-1 for v5.

    Output comes in five formats: standard with hyphens, uppercase, hyphen-free, braces, or a urn:uuid: value. A validator checks any UUID you paste and reports its version, while the timestamp view decodes a v7 value into the date it was created.

    UUID and GUID are two names for the same thing — Microsoft says globally unique identifier, the RFC says universally unique. Values are produced on your device, never traveling over the network.

    How to use this tool

    1. Choose a version

      Pick v4 for random IDs, v7 for time-ordered keys, or v3/v5 with a namespace and name for deterministic values.

    2. Generate

      Click Generate UUID for one value, or open the Bulk tab and slide the counter to 1000.

    3. Style the output

      Select standard, uppercase, no-hyphens, braces or URN formatting so output matches your codebase.

    4. Validate or decode

      Paste an existing UUID into the Validator to confirm it, or decode a v7 value in the Timestamp tab.

    Use cases

    Database primary keys

    Give each new row a unique ID without a central counter or a round-trip to the server.

    Distributed systems

    Two nodes can generate IDs independently with no risk of collision and no coordination.

    Session & request IDs

    Tag requests, traces, and sessions for correlation across logs without a shared sequence.

    Test fixtures & mock data

    Bulk-generate hundreds of realistic, unique keys when seeding databases or sample data.

    UUID versions at a glance

    VersionHow the value is built
    v4122 random bits from the crypto source — default for keys
    v7Unix milliseconds plus random bytes, so values sort chronologically
    v1Timestamp and node value; unique across space and time
    v3MD5 hash of namespace + name; identical input, identical result
    v5SHA-1 hash of namespace + name; preferred over v3

    v3 and v5 accept DNS, URL, OID and X.500 namespaces or a custom one.

    Common mistakes

    Mistake:Treating a UUID as a secret or password.

    Fix:UUID v4 is random but not a security token — use a dedicated generator for secrets and session tokens.

    Mistake:Truncating a UUID to shorten it.

    Fix:Cutting characters destroys the collision guarantees. Use the full UUID, or pick an ID scheme designed to be short.

    Mistake:Storing UUIDs as VARCHAR when the DB has a native type.

    Fix:Use the native UUID/GUID type (PostgreSQL uuid, SQL Server UNIQUEIDENTIFIER) for smaller storage and faster indexing.

    Mistake:Assuming UUIDs sort in creation order.

    Fix:v4 UUIDs are random and don't sort chronologically — use v7 (time-ordered) or a created-at column when order matters.

    Frequently asked questions

    Should I use UUID v4 or v7 for database keys?

    v7 starts with a millisecond timestamp, so new rows land near the end of a B-tree index and inserts stay local. Random v4 values scatter writes across the index and cause more page splits.

    Is a GUID the same as a UUID?

    Yes. GUID is Microsoft's name for the same 128-bit identifier with identical layout and version bits, so a GUID from any platform validates as a UUID.

    Can two random UUIDs collide?

    A v4 value carries 122 random bits, so a duplicate among even billions of identifiers is negligible — far less likely than a hardware fault corrupting data first.

    How do I generate many UUIDs at once?

    Open the Bulk tab, set a count from 1 to 1000, and generate. The list can be copied or exported to seed test fixtures.

    References & standards