UUIDv7 Range Builder

Generate and inspect ID/random/timestamp values in your browser. No input is sent to a server. Use it for first-pass spec compliance checks.

Status

Start (UTC)

Start (TZ)

End (UTC)

End (TZ)

Runs in your browser. No input is sent to a server. Use this as a first-pass diagnostic step.

How to use

Enter start/end Unix ms and click “Generate”. It outputs boundary UUIDs and a query example.

Notes (this tool)

  • UUIDv7 timestamp is a 48-bit Unix ms value. Out-of-range inputs are rejected.
  • An error is shown if start is greater than end.

About this page

What does this tool do?

This page builds boundary UUIDs for time-range queries. If you only need a single time boundary, use Timestamp→UUID.

For range queries, it is typical to use earliest for the start and latest for the end.

Query guidance

  • Use the basic form `id >= start_uuid AND id <= end_uuid`.
  • For an exclusive end, use `id < end_uuid` instead.
  • Convert seconds to milliseconds before inputting.

Debugging workflow (recommended)

  • Generate or paste a value
  • Check format, timestamp, and character constraints
  • Confirm against destination validation requirements

Operational notes

  • Format validity does not guarantee security or uniqueness. Confirm requirements by use case.
  • Align randomness, timestamp, and formatting handling with your operational policy.

Referenced specs

  • RFC 9562 (UUIDv7)
  • Boundaries: start earliest / end latest
  • Comparisons: inclusive / exclusive range
  • unix_ts_ms: 48-bit range

Typical use cases

  • Time-window queries on UUIDv7-keyed tables (e.g., id >= start AND id <= end).
  • Audit logs/events by time window (convert start/end to boundary UUIDs).
  • Time-based pagination (split by boundaries).

FAQ

Should time-window queries use `<= end` or `< end`?

Use `<= end` with a latest boundary, or `< next_start` when chaining intervals. Pick one convention and keep it consistent.

Can this be used on UUIDv4-based tables?

Not effectively. This relies on UUIDv7 time-ordering. UUIDv4 tables typically need a separate timestamp column for range queries.

References

  1. RFC 9562 §5.7 (UUIDv7)

These links are generated from site_map rules in recommended diagnostic order.

  1. UUID Inspect — Normalize UUID and inspect version/variant/timestamp
  2. UUIDv7 from Timestamp — Create UUIDv7 boundary values (earliest/random/latest) from Unix ms
  3. UUIDv7 Generator — Generate/validate UUIDv7 and extract time-derived fields

Example

Output varies by your input (example below).

start (earliest)
... 019be116-9806-7000-8000-000000000000
end (latest)
... 019be116-9806-7fff-bfff-ffffffffffff
SQL example
WHERE id >= start_uuid AND id <= end_uuid