Guide

UUID v4 vs UUID v7

Use this guide when you need stable-looking IDs for examples, fixtures, or database rows and want to understand which UUID version fits the job.

Short answer

  • UUID v4 is random and is the common default for test data, examples, and general unique identifiers.
  • UUID v7 includes timestamp ordering, which can make database indexes and event streams easier to work with.
  • Tidy Utils currently generates UUID v4 values locally in your browser, plus nil and max reference UUIDs.

UUID v4 and UUID v7 comparison

VersionHow it is builtGood forWatch out for
UUID v4Mostly random bitsMock data, fixtures, examples, client-side IDsNot naturally sortable by creation time
UUID v7Timestamp plus random bitsOrdered records, logs, event data, database insertsRequires library support and careful implementation
Nil UUIDAll zeroesPlaceholder documentation and sentinel examplesShould not be treated as a generated unique ID

Format an ID without changing its version

A UUID is a 128-bit value. The usual text form has 32 hexadecimal digits in 8-4-4-4-12 groups. Uppercase and lowercase represent the same bits; changing the text does not turn UUID v4 into UUID v7.

Use Format existing UUIDs in the UUID workspace for pasted IDs, or generate a v4 batch first. Choose a JSON array for fixtures, one ID per line for a list, or a destination-specific braced GUID or compact form when your receiving system requires it.

The formatter accepts one value per line or a JSON array of strings. It preserves order and duplicates and stops on an invalid entry. Checking the shape cannot prove uniqueness, random generation, version semantics, or that an ID exists in a database.

Hyphenated: 550e8400-e29b-41d4-a716-446655440000
Uppercase:  550E8400-E29B-41D4-A716-446655440000
Braced:     {550e8400-e29b-41d4-a716-446655440000}
Compact:    550e8400e29b41d4a716446655440000
JSON:       ["550e8400-e29b-41d4-a716-446655440000"]

When UUID v4 is enough

Use UUID v4 when you need realistic identifiers for test payloads, screenshots, fixtures, documentation, or temporary records.

For most browser-side examples and mock API data, UUID v4 is simpler than carrying timestamp-ordering assumptions into the sample.

When UUID v7 matters

UUID v7 can be useful when records need IDs that roughly sort by creation time. That can matter for database indexes, append-heavy tables, event streams, and log-like data.

If ordering is the real requirement, confirm your database, backend library, and downstream systems all support the UUID version you choose.

Documenting UUID fields

When a JSON payload includes UUID fields, use a schema description or field notes to explain whether the value is a random ID, an ordered ID, a placeholder, or a foreign key.

A generated schema can infer that an ID field is a string, but it cannot prove the UUID version or business meaning from one example.

FAQ

Does Tidy Utils generate UUID v7 values?

No. The current UUID tool generates UUID v4 batches and reference UUIDs locally in the browser.

Should I use UUID v4 for security tokens?

No. UUIDs are identifiers, not secrets. Do not use generated UUIDs as passwords, API keys, session tokens, or reset links.

Can UUID v4 values collide?

A collision is extremely unlikely for normal use, but UUID v4 uniqueness is still probabilistic rather than mathematically guaranteed.