Tools

Home
Password GeneratorRandom StringToken GeneratorRandom NumberHash GeneratorMAC Address Gen

UUID Generator

Generate UUIDs (v1, v4, v7) and GUIDs with bulk generation, validation, and parsing

Your files never leave your browser
Click Generate or press Space
Click the UUID to copy it to clipboard
Space or Enter to generate new UUID

Bulk Generation

UUID Validator

UUID Parser

History (last 20, session only)

No UUIDs generated yet

Generate v1, v4, or v7 UUIDs one at a time or in bulk up to 100, then copy or download the list. Paste any UUID into the validator to check its version, variant, and embedded timestamp. And everything runs in your browser. Nothing gets uploaded.

How It Works

Pick Version & Format
→
Browser Generates Random Bits
→
Formatted UUID Output

Your browser's cryptographic RNG produces the random bytes. For v4, all 122 payload bits are random. For v1, the current timestamp and a random node ID get encoded into the structure. V7 puts a Unix millisecond timestamp in the high bits, then fills the rest with randomness — so the UUIDs sort chronologically. The version and variant nibbles get set according to RFC 9562, and you get a properly formatted identifier.

Examples

Single v4 UUID for an API Request ID

You're logging API calls and need a unique correlation ID per request.

INPUT
Version: v4 Format: Standard
OUTPUT
f47ac10b-58cc-4372-a567-0e02b2c3d479

Bulk v7 UUIDs for Database Seeding

Populating a test database with 10 time-sortable primary keys. V7 keeps B-tree indexes happy because new records always append to the end.

INPUT
Version: v7 Format: No Hyphens Count: 10
OUTPUT
019604a8e1b77c3a8f1d2e5b4a6c9d03 019604a8e1b87d4b9e2c3f6a5b7d0e14 019604a8e1b97e5c0d3a4e7b6c8f1a25 ... (7 more)

Validating a UUID from a Bug Report

Someone pastes a UUID in a Slack thread. Is it v4 or v7? When was it created? Paste it into the validator to find out instantly.

INPUT
019604a8-e1b7-7c3a-8f1d-2e5b4a6c9d03
OUTPUT
Version: 7 Variant: RFC 9562 Timestamp: 2026-03-30T12:45:00Z Valid: Yes

Who Uses This

👨‍💻 Backend Developers

Primary keys for Postgres, MySQL, or DynamoDB tables — especially v7 for sorted inserts.

🔌 API Engineers

Request correlation IDs and idempotency keys that stay unique across microservices.

🧪 QA & Testers

Generating batches of realistic test data without spinning up a database.

📋 Project Managers

Quick unique reference codes for tickets, documents, or tracking spreadsheets.

Common Mistakes

Using v4 as a database primary key on huge tables

Random v4 UUIDs scatter inserts across the B-tree index, which causes page splits and slows writes on tables with millions of rows. Switch to v7 — the timestamp prefix keeps new rows appending sequentially.

Stripping hyphens and then failing validation

Some APIs and libraries expect the 8-4-4-4-12 format with dashes. If you remove them for storage, make sure your validation regex accepts both. Or just store them with hyphens — the 4 extra characters are not going to hurt.

Treating UUIDs as secret tokens

A UUID is unique, not secret. V1 leaks timestamp data, and v7 does too. Even v4 is just 122 bits of randomness — fine for identifiers, but use a proper cryptographic token (like a 256-bit random string) when you need something unguessable for security.

Technical Details

Frequently Asked Questions

What is the difference between UUID v4 and v7?

V4 is purely random — 122 bits from a cryptographic RNG. Great for general use, but the randomness means they don't sort in order. V7 puts a millisecond-precision Unix timestamp in the first 48 bits, then random data after that. This makes v7 ideal for database keys because new entries naturally sort by creation time.

Can two UUIDs ever be the same?

Technically possible, practically impossible. A v4 UUID has 5.3 x 10^36 possible values. You'd need to generate about 2.7 quintillion UUIDs before there's even a 50% chance of one collision. Your hard drive would fill up long before that happens.

Are UUIDs generated here safe to use in production?

Yes. The generator uses crypto.getRandomValues(), the same cryptographically secure RNG that server-side libraries rely on. It is built into every modern browser. The output is indistinguishable from UUIDs generated by the npm uuid package or Python's uuid module.

Which UUID version should I use for PostgreSQL primary keys?

V7. Postgres stores UUIDs as 128-bit values and indexes them in B-trees. Random v4 UUIDs scatter inserts, causing index fragmentation on large tables. V7's timestamp prefix means new rows always land at the end of the index, which is much faster. Postgres 17+ even has built-in uuidv7() support.

How do I validate if a string is a real UUID?

Check the format first: 8-4-4-4-12 hex characters with hyphens. Then look at the 13th character for the version (1, 4, 7, etc.) and the first digit of the fourth group for the variant — it should be 8, 9, a, or b for standard RFC UUIDs. Or just paste it into the validator on this page.

Share: