UUID / GUID Generator (v4 & v1)

The UUID / GUID Generator produces 128-bit RFC 4122-compliant Version 4 (pseudo-random) and Version 1 (timestamp-based) universally unique identifiers for database primary keys and distributed systems.

Modern distributed databases, microservice architectures, and REST APIs rely on Universally Unique Identifiers (UUIDs) to ensure collision-free primary keys without centralized coordination. Our UUID Generator creates RFC 4122-compliant UUID Version 4 (cryptographically pseudo-random) and Version 1 (timestamp and MAC-based) identifiers in bulk with customizable casing, formatting, and export options.

Tool Parameters & Configuration Options

Parameter Name Data Type Default Value Functional Description
count Integer (1–1000) 5 Number of UUIDs to generate per batch (1–1000 in API, 5–50 in UI).
version Enum (v4 | v1) v4 API parameter: RFC 4122 specification version: v4 (pseudo-random) or v1 (time-based).
casing Enum (lowercase | uppercase) lowercase UI Control: Hexadecimal character casing style.
hyphens Boolean true UI Control: Format with canonical 8-4-4-4-12 hyphenation or output raw 32-character hex strings.

Developer Use Cases & Testing Applications

  • Database Primary Key Seeding & Benchmarks: Hydrate PostgreSQL, MySQL, CockroachDB, or MongoDB staging databases with thousands of unique surrogate primary keys to benchmark indexing performance.
  • Distributed Tracing & Idempotency Key Mocking: Generate unique X-Request-ID headers and idempotency tokens for API gateway integration testing and distributed telemetry pipelines.
  • Event-Driven Message Payload Identification: Produce unique event IDs for Kafka topics, AWS SQS queues, and RabbitMQ message payloads during integration stress testing.

REST API Integration & cURL Example

You can invoke this utility directly in automated continuous integration workflows, Docker staging scripts, or terminal shells via standard HTTP GET requests:

cURL Request Example

curl -X GET "https://usaddressgenerator.org/api/v1/uuid/generate?count=3&version=v4"

Standard API Response (HTTP 200 OK)

{
  "status": "success",
  "count": 3,
  "version": "v4",
  "data": [
    "a3efd112-b82d-42ab-92fc-493d13e7ccf7",
    "e8ec5358-447f-4740-b62e-02d0931bca58",
    "0ed118a8-e6cb-47a7-a40b-e1d072a6f6d1"
  ]
}

Frequently Asked Questions

What is the structural difference between UUID Version 4 and Version 1?

UUID Version 4 relies entirely on cryptographically generated pseudo-random bits, allocating 122 of its 128 total bits to pure random entropy while reserving 6 bits for version and variant metadata. In contrast, UUID Version 1 is generated by combining the host system's 48-bit MAC hardware address with a high-resolution 60-bit timestamp representing the count of 100-nanosecond intervals since the Gregorian calendar reform (October 15, 1582). Version 4 provides complete privacy, while Version 1 provides temporal ordering.

What is the probability of a UUID Version 4 collision occurring in production?

To reach a one-in-a-billion ($10^{-9}$) probability of a single duplicate collision among randomly generated UUID Version 4 identifiers, an application system would need to generate approximately 103 trillion ($1.03 \times 10^{14}$) UUIDs in total, according to standard Birthday Problem probability calculations. This astronomical key space ($2^{122}$ or $5.3 \times 10^{36}$ possible permutations) guarantees reliable, collision-free identification across massively distributed cloud architectures and multi-tenant databases without centralized locking.

Why do high-write SQL databases sometimes prefer sequential UUIDs?

Random UUID Version 4 keys are uniformly distributed across the 128-bit keyspace. When inserted into clustered B-Tree indexes (such as PostgreSQL primary keys or MySQL InnoDB tables), random UUIDs force the database engine to perform random disk writes and frequent index page splits, increasing memory pressure. Sequential UUIDs (like UUIDv1, UUIDv6, or UUIDv7) order records chronologically, allowing continuous appending to index leaf pages and boosting write throughput.

Are the generated UUIDs strictly compliant with IETF RFC 4122 standards?

Yes, every generated UUID strictly complies with the IETF RFC 4122 specification. Version 4 UUIDs always contain the digit 4 in the version position (the 13th hexadecimal character, e.g., xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx) and a variant bit pattern of 8, 9, a, or b in the 17th hexadecimal character, guaranteeing full compatibility with all standard programming language UUID parsers and database native UUID columns.

Related Developer Tools & Testing Utilities