Solvezi.com
Home
Tools
Blog
About
Contact
  1. Home
  2. Developer
  3. UUID Generator Online

UUID Generator Online

Generate unique identifiers across all major versions (V1, V3, V4, V5)

Related Tools

More in Developer

Online JSON FormatterQR Code GeneratorRandom Password GeneratorHTML Encoder DecoderColor PickerDNS LookupHTTP Header ViewerLorem Ipsum GeneratorBinary ↔ ASCII ConverterYAML XML JSON ConverterRegex TesterURL Encoder DecoderBASE64 Encoder Decoder
Explore Other Categories

Share

https://www.solvezi.com/developer-tools/uuid-generator

Solvezi.com

Solve Easy
Privacy PolicyTerms
© 2026 Solvezi.com. All rights reserved.

1. Select UUID Version

2. Generated Single UUID

4. Generate Batch

Generated Batch Results

UUID Generator — Complete Guide

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information in computer systems. It is typically displayed as 32 hexadecimal digits in five groups separated by hyphens: 8-4-4-4-12, totaling 36 characters. UUIDs are generated without requiring a central authority, making them ideal for distributed systems, databases, APIs, and microservices.

UUID Versions Explained

UUID v4 (Random) — Most Common

Generated using random or pseudo-random numbers. No system information is exposed. Best for general-purpose unique IDs, session tokens, and primary keys where sort order is not required.

UUID v1 (Time-Based)

Uses current timestamp and MAC address. Chronologically sortable but can expose system information. Mostly used in legacy systems.

UUID v3 / v5 (Name-Based)

Generated by hashing a namespace and name. v3 uses MD5, v5 uses SHA-1. Same input always produces the same UUID — useful for deterministic IDs.

UUID v7 (Time-Sortable) — Modern Choice

Combines Unix timestamp with random bits. Sortable like v1 but safer. Recommended for database primary keys in high-volume systems.

Which UUID Version Should You Use?

  • General-purpose unique IDs: UUID v4 — random, safe, widely supported.
  • Database primary keys (sortable): UUID v7 — time-ordered, index-friendly.
  • Deterministic IDs from names/URLs: UUID v5 (SHA-1) — consistent output.
  • Legacy systems requiring timestamps: UUID v1 — only if sortability is needed and MAC exposure is acceptable.

UUID Collision Probability

A UUID v4 collision is practically impossible. You would need to generate approximately 2.71 × 10¹⁸ UUIDs to reach a 50% chance of a single duplicate. For any real-world application — even at billions of IDs per day — collisions are not a concern. This is why UUIDs are trusted in distributed databases, cloud infrastructure, and IoT systems.

UUID Formats

  • Standard: 550e8400-e29b-41d4-a716-446655440000 — human-readable, most common.
  • Compact: 550e8400e29b41d4a716446655440000 — 32 characters, no hyphens, saves storage.
  • Uppercase: 550E8400-E29B-41D4-A716-446655440000 — for legacy systems or visual consistency.

UUIDs in Databases

UUIDs are supported as primary keys in PostgreSQL (uuid type), MySQL (CHAR(36) or BINARY(16)), SQLite, and SQL Server (UNIQUEIDENTIFIER). For high-insert workloads, random UUID v4 can cause B-tree fragmentation. Use UUID v7 or ULID if sequential ordering matters for performance.

Frequently Asked Questions

What is a UUID?▾

A UUID (Universally Unique Identifier) is a 128-bit identifier used to uniquely label information in computer systems. It is formatted as 36 characters (8-4-4-4-12) and can be generated without central coordination, making it ideal for distributed systems.

What is the difference between UUID v1, v3, v4, and v5?▾

UUID v1 is time-based and uses timestamp + MAC address. UUID v4 is randomly generated and most commonly used. UUID v3 uses MD5 hashing of a name, while v5 uses SHA-1 hashing. V3/V5 always produce the same UUID for the same input.

Which UUID version should I use?▾

For most applications, UUID v4 is the best choice because it is random and does not expose system information. If you need sortable IDs for database primary keys, consider UUID v7. Use v3/v5 only when you need deterministic IDs from a name or URL.

What is the probability of a UUID collision?▾

The probability of generating the same UUID v4 twice is astronomically low. You would need to generate about 2.71 quintillion UUIDs to have a 50% chance of one collision. For all practical purposes, v4 UUIDs are unique.

Is UUID v4 secure?▾

UUID v4 is generated using cryptographically secure random numbers in most implementations. However, it is not a replacement for encryption or security tokens. Never use UUIDs as secrets or passwords.

Can I use UUIDs as database primary keys?▾

Yes. UUIDs work as primary keys in PostgreSQL, MySQL, SQLite, and most databases. Random UUIDs (v4) can cause index fragmentation in large tables. For high-volume inserts, UUID v7 (time-sortable) or ULID is often a better choice.

What does "name-based UUID" mean?▾

Name-based UUIDs (v3 and v5) are generated by hashing a namespace UUID and a name string. The same namespace + name always produces the same UUID. This is useful for generating consistent IDs for URLs, emails, or resource names.

How do I format a UUID?▾

The standard format is 8-4-4-4-12 hexadecimal characters separated by hyphens, e.g., 550e8400-e29b-41d4-a716-446655440000. Compact format removes hyphens (32 characters). Uppercase format uses capital letters.

Common UUID Mistakes to Avoid

  • Using UUID v1 in public APIs: Exposes MAC address and timestamp — privacy risk.
  • Using UUID v4 as a secret: UUIDs are identifiers, not passwords or tokens.
  • Storing UUIDs as strings in high-volume tables: Use BINARY(16) or native UUID types to save space.
  • Assuming UUIDs are always random: v1, v3, v5, and v7 have deterministic components.