UUID generator
Generate UUID v4 (random), v7 (time-ordered) and v1-style (time + random node) in batches, with case and hyphen options plus a validator for the structure, version and variant bits.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
v3 / v5 (namespace hashing, needs MD5 / SHA-1) are not provided; v1 uses a random node instead of the MAC address.
8f0a1b2c-3d4e-4f5a-8b6c-7d8e9f0a1b2c
Validate a UUID
What this tool does
- Fill in database primary keys, request trace ids and test fixtures: generate 1–1000 UUIDs at once and copy them straight out.
- Pick v7 when you need time-ordered keys: the first 48 bits are a millisecond timestamp and the sequence increments within a millisecond, so index writes stay local instead of jumping around like v4.
- Validate an existing UUID: check the 8-4-4-12 structure, hex characters, version nibble and variant bits, and see exactly which check failed.
- Recover the timestamp embedded in a v1 or v7 UUID: paste one to see the moment it was created, which makes log correlation easy.
Example
Input
f81d4fae-7dec-11d0-a765-00a0c91e6bf6
Output
Valid: yes Version: v1 Variant: rfc4122 Embedded timestamp: 854991792216 (1997-02-03T17:43:12.216Z)
The example uses the classic v1 sample pre-filled on the page, which really does come from 1997. Generated UUIDs differ every run, so the example shows the validate path; the generator offers upper case and hyphen-free output.
Frequently asked questions
Should I use v4, v7 or v1?
Default to v4: 122 random bits, universally supported and unpredictable, which suits IDs exposed to the public. Use v7 for time-ordered keys and database primary keys, since it stays increasing even within one millisecond. v1 is the legacy format — this tool uses a random node instead of the MAC address, so pick it for old systems but do not rely on its uniqueness guarantees.
Why does v1 not use the real MAC address?
The original RFC 4122 v1 writes the network card MAC into the node field, which leaks hardware details and can be used to track a device. This implementation uses a random node and a random clock sequence, so it is “v1-style” rather than strict v1 — the cost is losing the strong cross-machine uniqueness guarantee.
Why was my UUID reported as invalid?
Common causes: not 32 hex characters after removing hyphens, hyphens in the wrong places, a version nibble (13th character) outside 1–8, or a variant nibble (17th character) outside the RFC 4122 10xx range. The nil (all zeros) and max (all Fs) forms are accepted as special cases.
Can UUIDs collide?
v4 has 122 random bits, so you would need roughly 2.7×10^18 values for a 50% chance of one collision — not a practical concern. v7 uses a sequence counter to stay ordered and unique within a millisecond. The real risks are a compromised random source or copy-pasting, not the algorithm.
Are generated values sent to a server?
No. Randomness comes from the browser’s crypto.getRandomValues and both generation and validation are local: no request is made and nothing is stored. If crypto is unavailable the tool throws instead of falling back to Math.random.
Keywords:uuidguidv4v7v1uuid 生成随机 id时间有序校验rfc 9562