UUID / GUID Generator
Generate random v4 UUIDs for database primary keys, API tokens, and unique identifiers. Bulk generation up to 100 UUIDs at once.
A UUID is a 128-bit identifier you can generate independently on any machine with a vanishing probability of collision — no coordination, no central sequence, no database round trip. Version 4 UUIDs, the kind this tool produces, are 122 bits of randomness. That is enough that generating a billion per second for a century still leaves the odds of a duplicate negligible. Generation uses the browser's cryptographic random source and happens entirely on your device.
How to generate a UUID
- Choose how many identifiers you need — one for a quick test, or a batch for seeding fixtures.
- Click Generate. Each UUID appears in the canonical 8-4-4-4-12 hyphenated form.
- Copy an individual value, or copy the whole batch at once for pasting into a seed script.
- Regenerate freely; every click produces entirely fresh values.
The UUID / GUID Generator runs entirely in your browser — nothing you enter is uploaded, stored, or logged.
When to use this tool
Assigning primary keys before insert
Generating the id client-side lets you build an entire object graph with valid references before anything reaches the database, which simplifies offline-first and optimistic-update patterns considerably.
Correlating requests across services
A UUID attached to an incoming request and propagated through every downstream call turns a distributed trace into a single greppable string.
Naming uploaded files safely
Storing an upload under a UUID rather than its original filename removes an entire class of path traversal and collision problems in one step.
Things worth knowing
- Version 4 UUIDs are random, so they scatter across a B-tree index. On very large tables this hurts insert performance — UUIDv7, which is time-ordered, is the modern answer.
- UUIDs are case-insensitive by specification but conventionally written in lowercase. Normalise before comparing as strings.
- Stored as text a UUID is 36 characters; stored as a native binary or uuid column it is 16 bytes. On large tables that difference is worth having.
- Do not treat a UUID as a secret. It is unguessable, but it is not an access control mechanism.
Frequently Asked Questions
What is a UUID v4?
What is the chance two UUIDs collide?
What is the difference between UUID v1, v4, and v7?
Can I use UUIDs as database primary keys?
Are these UUIDs cryptographically secure?
Why do all version 4 UUIDs have a 4 in the same position?
Related Tools
Strong Password Generator
Generate highly secure, cryptographically random passwords with customizable length, symbols, and memorability.
Base64 Encoder / Decoder
Encode text or decode Base64 strings instantly with live UTF-8 support and URL-safe mode.
JSON Formatter & Validator
Format, validate, prettify, minify, and inspect JSON payloads with real-time error detection.