UUID Generator

~/tools/uuid $ ./gen
config.json
output.txt

UUID Generator

UUIDs give probabilistically unique IDs without a central allocator. This generator creates values in common RFC formats so you can seed test databases, mock APIs, and configure correlation IDs—know when you need random v4 versus time-based v1 for your data model.

How to use

  1. Pick the version your stack expects (often random v4 for new keys).
  2. Generate one ID or a batch for fixtures, keeping letter case consistent with your column type.
  3. Paste into migrations, tests, or HTTP headers; store as native UUID types in databases when available for indexing efficiency.

FAQ

Are UUID collisions impossible?
They are astronomically unlikely for v4 random IDs; birthday attacks matter more if you truncate bits. Always enforce unique constraints in the database anyway.
Should I use UUID v1?
v1 embeds time and MAC-derived node bits, which can leak ordering clues; v4 is opaque random. Some systems use v7 for time-sortable identifiers—match what your storage layer supports.
Why do some APIs use lowercase and others uppercase?
RFC 4122 allows case-insensitive comparison; still be consistent across services to avoid string equality bugs in JSON.