Choose a version for the job
Use v4 for random identifiers without an embedded timestamp. Use v7 when you need a millisecond timestamp prefix; inspect it with the UUID v7 timestamp converter. IDs in a v7 batch can share a timestamp. Do not use their order as proof of transaction order. v1 and v6 carry timestamp and node fields; choose them when your integration requires those formats.
One batch, several representations
Uppercase, braces, and removing hyphens change the text, not the identifier. Changing these controls reformats the current batch. Generate again creates new IDs. Check which representation the receiving system accepts; hyphenated lowercase is the default here.
- TXT: one ID per line, with no header.
- JSON: an array of strings, ready to parse.
- CSV: an
idheader and one quoted value per row. - SQL: a
VALUESclause with one quoted string per row and a final semicolon. Add your ownINSERT INTO table_name (id)before it.
For example, to import into a PostgreSQL UUID column:
CREATE TEMP TABLE fixture_ids (id uuid PRIMARY KEY);
INSERT INTO fixture_ids (id)
VALUES
('017f22e2-79b0-7cc3-98c4-dc0c0c07398f');For ongoing application inserts, generate IDs in your app or database. Follow the PostgreSQL UUID v7 guide for a column default, or the C# UUID guide for .NET generation and formatting.
Keep IDs and security separate
Use a unique constraint where uniqueness matters. UUIDs identify records; they are not access checks or passwords. For the format and security considerations, see RFC 9562.