Random Datetime

Set a start and an end.

Use this tool

Result

The result appears in this panel after you run the tool.

About this tool

The result is an ISO timestamp inside that range.

The end has to be after the start.

How to use it

  1. Open this page and provide the input it asks for.
  2. Set the options that are visible, then use Pick a time.
  3. Read the result in the panel. Copy it or download it when a file is offered. The input stays in this browser.

Limitations

An ISO instant inside a clipped window

How the instant is chosen

The start control defaults to 2020-01-01 and the end control to 2030-01-01. Both are parsed with the Date constructor. If either is invalid, or if the end is not strictly after the start, the page throws and asks for a start before the end. Otherwise it draws randomInt of the millisecond gap, with a floor of 1, and adds that offset to the start. The result is that Date written with toISOString, so you see a UTC timestamp with a Z, not a zoned civil time.

randomInt asks crypto.getRandomValues for a single 32-bit cell and keeps that cell modulo the requested maximum. A uint32 is at most 4294967295. When the gap is larger than that, the modulo does not reach the far end of the window. 2^32 milliseconds is about 49.7 days. The default decade-long window is far larger, so the instants you can actually hit lie in the first 49.7 days after the start, not uniformly across the decade. A window shorter than or equal to 2^32 milliseconds can cover its whole span, still slightly uneven unless that shorter gap shares every factor of 4294967296.

What the string is

The value is an instant for fixtures, seeds, and examples. It is not a business date in a named time zone. The Z suffix does not follow a region’s summer-time shift. It is not a date of birth for a real person, and it is not the fictional-person tool. It does not produce a date-only string without a time. The time portion is the leftover milliseconds of the offset.

Windows that mislead

The default decade is the wrong window when you need a uniform draw across years. Narrow the start and end until the gap fits in 32 bits if the fixture must be able to land anywhere inside it. A cryptographic timestamp or a unique id is a different job. Two clicks can land on the same millisecond. There is no collision check. Do not use it to schedule a real reminder. The page does not store the instant and does not contact a calendar. It prints one ISO string from the draw above, and the clip on long windows is part of that draw.

Privacy

Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.