use case
How to generate a UUID v4 online
Get a cryptographically random UUID instantly without installing any tools.
UUID v4 is the default choice for generating unique identifiers in web applications, databases, and APIs. Whether you need a one-off ID for a test fixture, a correlation ID to paste into a log query, or a batch of IDs for a database seed script, this tool generates them in milliseconds without installing Node.js, Python, or any CLI tools. This guide shows how to generate one or more UUID v4 values and choose the right format for your use case.
Step-by-step guide
- Set the count: For a single ID, leave count at 1. For a batch — database seeds, test fixtures, bulk inserts — set count up to 100. Each UUID is independently random.
- Choose hyphenated or compact: Use hyphenated (the default) for SQL columns typed as UUID, for ORM models, and anywhere the RFC 4122 format is expected. Use compact for URLs, file names, or systems that reject hyphens.
- Click Generate and copy: The UUIDs appear instantly. Click Copy to put them on your clipboard — one per line for multi-UUID batches, ready to paste into SQL, JSON, or a spreadsheet.
Frequently asked questions
- Is it safe to use a UUID generated in a web tool?
- Yes — this tool generates UUIDs server-side using Node.js crypto.randomUUID(), which calls the OS cryptographically secure random number generator. The generated values are never stored or logged. For extremely sensitive secrets (tokens, passwords), use a dedicated secret manager rather than a UUID.
- Can I use these UUIDs as database primary keys?
- Yes, UUID v4 is widely used as a primary key in PostgreSQL (uuid type), MySQL (CHAR(36) or BINARY(16)), MongoDB, and most modern ORMs. Note that random UUIDs cause index fragmentation over time in clustered indexes. If you insert millions of rows per day, consider UUID v7 (time-ordered) or ULID instead.
Try it now
Use the UUID Generator to complete this task — free, no sign-up, runs in your browser.
Open UUID Generator →