Tools

Home
Password GeneratorLorem IpsumCoin FlipperRandom StringToken GeneratorRandom Color

Random GUID Generator

Generate cryptographically secure v4 GUIDs with custom formatting options

Your files never leave your browser
Count:0
Format:-
Ready·Using crypto.getRandomValues()

Spit out 1 or 1,000 v4 GUIDs in one click, with toggles for uppercase, hyphens, and braces so the format matches whatever your database, API, or .NET project expects. Each one comes from the browser's Web Crypto API — cryptographically random, RFC 4122 compliant, and unique enough that you'll never hit a collision in practice. And everything runs in your browser. Nothing gets uploaded.

How It Works

16 Random Bytes
→
Set Version & Variant Bits
→
Format as GUID

The browser’s crypto.getRandomValues() fills 16 bytes with cryptographically strong randomness. Two of those bytes get specific bits forced — byte 7 gets its top nibble set to 4 (marking it as version 4), and byte 9 gets its top two bits set to 10 (the RFC 4122 variant). The 16 bytes are then converted to a 32-character hex string and formatted with optional hyphens, uppercase, or braces based on your settings.

Examples

Standard lowercase with hyphens

The default format most APIs and databases expect.

INPUT
Count: 3 Uppercase: Off Hyphens: On Braces: Off
OUTPUT
a3f1b2c4-d5e6-4f78-9a0b-1c2d3e4f5a6b 7e8f9a0b-1c2d-4e3f-8a5b-6c7d8e9f0a1b 2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e

Uppercase with braces (.NET / C# style)

Common in .NET codebases and Windows registry entries. Turn on all three toggles.

INPUT
Count: 1 Uppercase: On Hyphens: On Braces: On
OUTPUT
{A3F1B2C4-D5E6-4F78-9A0B-1C2D3E4F5A6B}

Compact hex string (no hyphens)

Useful when you need a clean 32-character identifier for filenames, URL slugs, or database keys that don’t allow special characters.

INPUT
Count: 2 Uppercase: Off Hyphens: Off Braces: Off
OUTPUT
a3f1b2c4d5e64f789a0b1c2d3e4f5a6b 7e8f9a0b1c2d4e3f8a5b6c7d8e9f0a1b

Who Uses This

👨‍💻 Backend Developers

Generating primary keys, correlation IDs, and idempotency tokens for APIs and message queues.

🧪 QA Engineers

Creating test fixture data with realistic unique identifiers instead of sequential numbers.

🗄️ Database Admins

Seeding tables with properly formatted GUIDs during migrations or environment setup.

🎮 Game Developers

Assigning unique session or player IDs for multiplayer backends and save systems.

Common Mistakes

Using GUIDs as short user-facing codes

A GUID is 32 hex characters. Nobody wants to type that into a form. If you need a human-readable code (like an order number or invite link), use a shorter random string or a different encoding scheme instead.

Assuming GUIDs are sequential or sortable

V4 GUIDs are random. They won’t sort in creation order, and using them as clustered primary keys in SQL Server causes index fragmentation. If ordering matters, look into UUIDv7 or add a separate timestamp column.

Mixing up GUID formats across systems

Some systems want hyphens, others don’t. .NET wraps them in braces. PostgreSQL stores them lowercase. Pick one canonical format for your project and convert at the edges — otherwise you end up with duplicates that are actually the same ID in different clothes.

Technical Details

Frequently Asked Questions

What is the difference between a GUID and a UUID?

Same thing, different name. “GUID” caught on in the Microsoft world — Windows, .NET, SQL Server. “UUID” is what the RFC spec and most open-source tools call it. Both describe a 128-bit identifier. This generator produces RFC 4122 v4 compliant output that works everywhere.

Are v4 GUIDs really unique?

Statistically, yes. There are 2^122 possible v4 GUIDs — that’s about 5.3 × 10³⁶. You’d need to generate around a billion GUIDs per second for 85 years before hitting a 50% chance of a single collision. For any practical application, treat them as unique.

Can I use these GUIDs as database primary keys?

Absolutely. GUIDs work well as primary keys, especially in distributed systems where you can’t rely on auto-increment. One thing to watch: random v4 GUIDs cause index fragmentation on clustered indexes in SQL Server. If that’s your setup, consider using NEWSEQUENTIALID() on the server side or switching to UUIDv7 for time-ordered IDs.

Is this generator safe for security tokens?

The randomness comes from your OS via the Web Crypto API, so the output is cryptographically strong. That said, GUIDs have a fixed structure (version and variant bits are predictable), leaving 122 bits of actual randomness. For high-security tokens like API keys, you might want a full 256-bit random value instead.

What does the “4” in a v4 GUID mean?

It’s the version number. The 13th hex digit is always 4, which tells any system parsing the GUID that it was randomly generated (as opposed to v1 which uses a timestamp and MAC address, or v5 which uses a namespace hash). The version field is the main way to tell UUID types apart at a glance.

Share: