UUID v1 Generator

Generate time based UUID v1 values in your browser, with a random node id instead of your MAC address. Decode the timestamp, compare with v6 and v7. Free, nothing is uploaded.

Generate V1 UUIDs

Pick how many and the format you want. Everything runs in your browser.

Format

Your UUIDs

Copy one, copy them all, or download the list. The format options above apply to everything shown here.

    What a UUID v1 is

    Version 1 is the original time based UUID from the 1990s. It packs three things into 128 bits: a 60 bit timestamp counting 100 nanosecond ticks since 15 October 1582, the start of the Gregorian calendar; a 14 bit clock sequence that changes if the clock is set back; and a 48 bit node id, which was designed to be the network card's MAC address.

    The idea was that a unique machine plus a unique time gives a unique id with no randomness needed. It works, but it has two problems that later versions fixed.

    The two problems with v1

    • It leaks the MAC address. Anyone holding a v1 UUID made from a real MAC can tell which machine produced it. This was how the author of the Melissa virus was traced in 1999. Most modern libraries, including the one on this page, use a random node id with the multicast bit set instead, which the RFC allows.
    • It does not sort by time. The timestamp is split with the low 32 bits first, so consecutive values do not compare in order. That is why v1 keys fragment database indexes as badly as random ones. Version 6 reorders the same fields to fix this, and version 7 is the modern replacement.

    How this generator makes them

    A browser cannot read your MAC address, so the node id here is random and marked as such. The timestamp comes from your clock. Paste a result into our validator and decoder to see the time, clock sequence and node id read back out of it.

    Where v1 still shows up

    • MySQL. The built in UUID() function returns v1. That is why MySQL's UUID_TO_BIN(uuid, 1) has a swap flag: it moves the time high bits to the front so the binary form sorts by time.
    • Cassandra and Scylla. The timeuuid type is v1, used for time ordered clustering columns.
    • Older Java and .NET systems that adopted UUIDs before random generators were trusted.

    If you are starting something new, v1 is rarely the right choice. Use v7 for time ordering and v4 when order does not matter.

    Anatomy of an example

    e5c2f1a0-9f3b-11ef-a1b2-0242ac120002
    ^^^^^^^^ time_low
             ^^^^ time_mid
                  ^^^^ version 1 plus time_high
                       ^^^^ variant plus clock sequence
                            ^^^^^^^^^^^^ node id, MAC or random

    Generate a v1 UUID in code

    // JavaScript, uuid package
    import { v1 as uuidv1 } from "uuid";
    const id = uuidv1();
    
    # Python
    import uuid
    uuid.uuid1()          # uses the real MAC address by default
    
    -- MySQL
    SELECT UUID();

    Frequently asked questions

    Does this generator reveal my MAC address?

    No. Browsers do not expose the MAC address to web pages at all. The node field is filled with random bits and its multicast bit is set, which is the standard's way of saying this is not a real hardware address.

    Can I get the creation time back out of a v1 UUID?

    Yes, exactly, to 100 nanoseconds. Paste it into our validator and decoder page. The same goes for v6 and v7.

    v1 or v7?

    v7 for anything new. It sorts by time, hides nothing about your hardware and is supported natively in current databases and runtimes. v1 only makes sense when an existing system such as Cassandra timeuuid requires it.

    ↑ Top
    Copied!