How to use the UUID Generator
- Choose Version 4 for fully random IDs or Version 7 for IDs that sort by creation time.
- Enter how many you need (up to 10,000) and click Generate — or press Ctrl/⌘ + Enter.
- Adjust the format: uppercase, without hyphens, in braces, or as a JSON array or SQL list.
- Click Copy all or Download. Paste any UUID into Validate & inspect to see its version, variant and embedded timestamp.
What is a UUID?
A UUID (Universally Unique Identifier), called GUID in the Microsoft world, is a 128-bit identifier written as 32 hexadecimal digits in five groups: 8-4-4-4-12, for example 550e8400-e29b-41d4-a716-446655440000. UUIDs can be generated independently on any machine without a central coordinator, with a negligible chance of collision — ideal for database primary keys, distributed systems, file names, idempotency keys and correlation IDs. The format is defined in RFC 9562 (2024), which replaced RFC 4122 and introduced versions 6, 7 and 8.
UUID v4 vs. v7
| Version 4 | Version 7 | |
|---|---|---|
| Content | 122 random bits | 48-bit Unix timestamp (ms) + 74 random bits |
| Sortable by creation time | No | Yes |
| Database index performance | Random inserts fragment B-tree indexes | Sequential inserts, similar to auto-increment |
| Reveals creation time | No | Yes (to the millisecond) |
| Example | 3b241101-e2bb-4255-8caf-4136c566a962 | 0199f2a4-7c3e-7b21-9d4f-3a6c8e1b2d40 |
Choose v7 for primary keys in PostgreSQL, MySQL or SQL Server tables: because new IDs are always larger than older ones, inserts append to the end of the index instead of splitting random pages. Choose v4 when the ID must not leak any information, such as public tokens. Within a single bulk run, this generator keeps v7 IDs strictly increasing even when several are created in the same millisecond, using a counter in the rand_a field as RFC 9562 suggests.
How to read a UUID
Two positions carry metadata. The first digit of the third group is the version (4 or 7 above). The first digit of the fourth group encodes the variant: 8, 9, a or b means a standard RFC 9562 UUID. In a v7 UUID, the first 12 hex digits are the creation time in milliseconds since 1970 — the inspector decodes it for you, and also extracts timestamps from v1 and v6 UUIDs. The special nil UUID is all zeros; the max UUID is all f.
Are UUIDs really unique?
For v4, you would need to generate about 2.7 × 1018 UUIDs to reach a 50% chance of a single collision. That assumes a good random source: this tool uses the browser's cryptographically secure crypto.getRandomValues(), never Math.random(). UUIDs are identifiers, not secrets, though — don't use them as passwords or session tokens; create those with the Password Generator.
Generating UUIDs in code
JavaScript: crypto.randomUUID() (v4). Python: uuid.uuid4(), and uuid.uuid7() from Python 3.14. PostgreSQL: gen_random_uuid() (v4) and uuidv7() in PostgreSQL 18. Other unique-ish values you might need: hashes for content fingerprints and Unix timestamps for time.
Tools that pair well with the UUID Generator
- Base64 Encode / Decode — Convert text to Base64 and back with full UTF-8 support (accents, emoji), switch to URL-safe Base64, or drop a file to get its Base64 string or data URI.
- Lorem Ipsum Generator — Create placeholder text for mock-ups and layouts in seconds — classic Lorem Ipsum or readable English filler, as paragraphs, sentences, words or list items, with or without HTML tags.
- URL Encode / Decode — Percent-encode text for safe use in URLs, decode encoded strings back to readable text, and break any URL down into its parts and query parameters.
- JWT Decoder — Paste a JSON Web Token to inspect its header and payload, check when it expires and verify its signature.
Frequently asked questions
What is the difference between a UUID and a GUID?
Should I use UUID v4 or v7 for database keys?
Can two generated UUIDs ever be the same?
Are these UUIDs generated securely?
How do I get the timestamp from a UUID v7?
parseInt(uuid.slice(0, 8) + uuid.slice(9, 13), 16) in JavaScript.