ГСЧ randomness lab

Utilities

Random date and time

A random moment between two dates — accurate to the minute or day.

instant computed locally
Result Randomness: local CSPRNG
Click 'Generate' — the dates will appear here in ascending order.
Ready
Range to the minute
— beginning
— end
— possible values

Set the dates to see the size of the range.

Dates are counted locally: the moment is chosen equally likely from all minutes (or days) of the range and does not leave the browser. How the generator works.

Why is a random date needed

Random dates are needed everywhere data that does not yet exist is required: to fill a table with test orders, to check the filter by period, to make sure that a reminder triggers a week before the event. Such sets are collected manually for a long time, and they turn out too 'even' — all the dates end up being the first day of the month.

The second area is creativity and decisions. A random day for a meeting, a cutoff date in a draw, 'how many weeks to remind.' The generator selects the moment equally likely from the entire range, so the result is not biased toward the beginning or middle.

How is the range calculated

Boundaries are included in full. If you select 'from January 1 to January 31' and include time, then a random moment will be uniformly distributed across all the minutes of these thirty-one days: from 00:00 on January 1 to 23:59 on January 31. Without time, the selection is done by days — the same interval, but 31 equally likely days instead of 44,640 minutes.

RangeDaysMinutes
Week710 080
Month≈ 30≈ 43 200
Year365525 600
10 years3 6505 256 000

Pay attention to the clock: the generator operates in the timezone of your browser. If the server and the computer are in different timezones, midnight will be different — this is important for test data, so it is better to explicitly specify the timezone in the data itself.

Formats and where they would be useful

  • DD.MM.YYYY — usual records and documents;
  • YYYY-MM-DD — ISO 8601: sorted as a string and understood by most APIs and databases;
  • January 1, 2026 — for text, letters, and headings;
  • happy [day of the] week — when it is important whether it is a workday or a day off.

A list sorted in ascending order is easier to read and immediately shows the spread. Randomness remains in the values themselves: the order does not affect the equal likelihood.

What is important to remember

  • repeats are possible — selection is done with replacement, just like in real life;
  • Boundaries are included, so a range of one day will give the same date;
  • the transition to daylight saving time in some time zones shifts the hour, but not the date range;
  • The calendar arithmetic of different libraries may differ at the month boundary.
Frequently Asked Questions
Why are the dates already sorted?
So the list is read as a chronology. Sorting is done after selection, so the probability of each date does not change. If you need a random order, take the values from the list in any order.
Can values repeat?
Yes. Each moment is chosen independently, so repetitions are quite likely within a narrow range — just as it should be with a random sample with replacement. This is not a generator error.
What time zone is used?
Browser local timezone. Dates from fields are interpreted as local, not as UTC, so 'January 1' will remain January 1, not shift to December 31.
Is it possible to get a past date?
Yes, it is enough to set the necessary boundaries: for example, from January 1, 2020 to December 31, 2020. There are no restrictions on the past — only on the number of values (up to 50).
Are the bounds inclusive?
Yes, both. The range 'from 1 to 1' will give the same date, and 'from 1 to 2' will give one of the two days with equal probability.
Why download a CSV if you can copy it?
CSV opens with a spreadsheet and is suitable for test datasets. Each value is enclosed in quotes, so commas in the format "January 1, 2026, 14:05" do not break the columns.
↑↓ navigation Enter to open Esc close