Free tool · runs in your browser
UUID generator
Generate random version 4 UUIDs, one at a time or in bulk, and copy them in the format you need.
Quick answer
A UUID (universally unique identifier) is a 128-bit ID written as 32 hexadecimal characters in five groups, like 3f2b8c1e-9a4d-4c7e-b5f0-1d2e3a4b5c6d. Version 4 UUIDs are random; this tool creates them with the browser's cryptographically secure random generator, so the chance of two being the same is negligible.
How to use it
- Choose how many. From 1 to 500.
- Pick a format. Lowercase or uppercase, with or without dashes.
- Copy them. One per line, ready to paste.
Example
Two random version 4 UUIDs:
Input
How many: 2 · Dashes: on · Uppercase: offOutput
ab08a0b9-f88e-4a24-a97c-d1abe84806b9
b75d6a62-daac-4d22-8d9f-d3229db508c6Common errors and how to fix them
invalid input syntax for type uuid (PostgreSQL)- The value is not a valid UUID, often because it has extra spaces or quotes, or dashes in the wrong places. Send the standard 36-character form.
Two UUIDs look the same but do not match- One is uppercase and the other lowercase. UUIDs are case-insensitive, so compare them in lowercase.
Slow inserts with a UUID primary key- Random v4 UUIDs spread inserts across the whole index. For large tables, consider time-ordered UUID v7 or store UUIDs as a native uuid or 16-byte binary type, not text.
crypto.randomUUID is not a function- It needs a secure context (HTTPS or localhost) in the browser, and Node.js 14.17 or later. Serve the page over HTTPS.
Frequently asked questions
Can two UUID v4 values be the same?
In theory yes, in practice no: there are about 5.3 × 10^36 possible version 4 UUIDs.
What is the difference between UUID v4 and v7?
v4 is fully random. v7 starts with a timestamp, so values sort by creation time, which suits database primary keys.
Is a UUID the same as a GUID?
Yes. GUID is Microsoft's name for the same 128-bit identifier.
How do I generate a UUID in JavaScript?
crypto.randomUUID() in modern browsers and Node.js returns a version 4 UUID.
Should I use UUIDs as database IDs?
They are fine when IDs must be unique across systems; for heavy write loads, time-ordered UUIDs (v7) index better than random v4.
How is a UUID formatted?
32 hexadecimal characters in groups of 8-4-4-4-12. The first character of the third group shows the version, which is 4 for v4.
Are UUIDs secure tokens?
Version 4 UUIDs from a secure generator are hard to guess, but for secrets such as password reset links, use a dedicated random token with enough length and an expiry.
What is a nil UUID?
00000000-0000-0000-0000-000000000000, sometimes used as an empty value.
How do I generate a UUID in Python?
import uuid, then uuid.uuid4().
Are UUIDs case-sensitive?
No. Uppercase and lowercase represent the same value, though lowercase is the usual form.
Sources
Related
More tools in this group
- JSON formatter and validator
- JSON validator
- HTML formatter
- CSS minifier
- JavaScript minifier
- HTML encoder
- URL encoder and decoder
- Base64 encoder and decoder
- JWT decoder
- Regex tester
- Color converter
Guides and apps
- Scaling a Node.js API from 200K to 1M users with 60% faster responses
- Why users get logged out at random, and how to fix JWT session bugs
- How we kept a backend fast at 300M+ users: indexes, Redis and RPC failover
- Hire a Node.js backend developer
- Hire an AI full stack developer
- Hire me to build AI and backend systems