A new random UUID is below. Generate one or a thousand, as v4 (random) or v7 (time-ordered), in the format you need. They're made with your browser's secure random generator, crypto.getRandomValues, and never leave this page.
Paste any UUID to see its version, variant and, for v1, v6 and v7, when it was created.
| — | Paste a UUID above. |
| v4 | v7 | |
|---|---|---|
| Contents | 122 random bits | 48-bit millisecond timestamp, then 74 random bits |
| Sort order | Random | Creation order |
| As a database primary key | Works, but inserts land all over the index, which fragments it and slows big tables | Inserts go at the end of the index, close to an auto-increment integer |
| Reveals | Nothing | When it was created, to the millisecond |
| Standard | RFC 9562 (was RFC 4122) | RFC 9562, published May 2024 |
Short version: use v7 for database keys and anything you'll sort, v4 when the ID shouldn't reveal timing. Neither is a password or session token.
// JavaScript (browsers and Node 19+)
crypto.randomUUID()
# Python
import uuid; uuid.uuid4() # v7: uuid.uuid7() in Python 3.14+
-- PostgreSQL
SELECT gen_random_uuid(); -- v7: uuidv7() in PostgreSQL 18+
# Command line
uuidgen # macOS and most Linux
[guid]::NewGuid() # PowerShell
A UUID is 128 bits written as 32 hex digits in five groups: 8-4-4-4-12. The first digit of the third group is the version (the 4 in xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx). The first digit of the fourth group, y, is the variant: 8, 9, a or b for standard UUIDs. The all-zero 00000000-0000-0000-0000-000000000000 is the "nil" UUID, often used as a placeholder.
HeaderForge, our free Chrome extension, sets request headers such as X-Request-ID or Authorization on the sites you choose, and shows whether each rule fired. No account, no tracking.
More free tools: JWT decoder · CORS tester · HAR file viewer · what is my user agent.