Random Date Generator
RG-20Type a start date and an end date, choose a format, and get a list of random dates inside that span. Both days are included, and everything is in UTC.
Runs in your browser. Nothing is uploaded.
Optional: start and end date as YYYY-MM-DD, for example 2020-01-01 2025-12-31 (empty means 2000-01-01 to 2030-12-31)
Random dates
How to use it
- Type the start and end date as YYYY-MM-DD, for example 2020-01-01 2025-12-31. Empty means 2000 to 2030.
- Choose how many dates you want.
- Pick a format: ISO, US, European, long, with time, ISO 8601 or Unix seconds.
- Choose an order and copy the dates.
Dates, times and time zones
The start and end day are both included. The date-only formats pick a random day. The formats with a time (YYYY-MM-DD hh:mm:ss, ISO 8601 with Z and Unix seconds) pick a random second from 00:00:00 on the start day to 23:59:59 on the end day. Everything is in UTC, not your local time zone, so a Unix value is seconds since 1970-01-01 00:00:00 UTC. Dates before 1970 give negative Unix values.
What is checked
Dates must be written as YYYY-MM-DD and must exist, so 2023-02-30 is refused, while 2024-02-29 is accepted. Years from 1000 to 9999 are allowed and follow the Gregorian calendar, including for years before 1582. The tool does not skip weekends or holidays and can repeat a date. To get only business days, filter the list in a spreadsheet.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Enter a start date and an end date, for example 2020-01-01 2025-12-31. | The box holds fewer or more than two dates. | Type exactly two dates, or clear the box. |
The start date is after the end date. | The dates are in the wrong order. | Swap them. |
Years before 1000 are not supported. | A date has a year below 1000. | Use years from 1000 to 9999. |
Questions people ask
How do I get a random date between two dates?
Type the two dates in the box as YYYY-MM-DD with a space between them, then press Generate dates. Both the start and the end day can appear in the result. Choose a format and an order, then copy the list.
Can I generate random dates with a time?
Yes. Choose YYYY-MM-DD hh:mm:ss or ISO 8601 with Z under Format. A random second of the day is drawn, from midnight on the start day to the last second of the end day, in UTC.
How do I get a random Unix timestamp?
Pick Unix seconds under Format. The values count seconds since 1970-01-01 00:00:00 UTC, so a date in 2024 gives a number near 1.7 billion. Dates before 1970 come out negative.
Which date formats are supported?
YYYY-MM-DD, MM/DD/YYYY, DD/MM/YYYY, DD.MM.YYYY, a long form such as March 5, 2024, YYYY-MM-DD hh:mm:ss, ISO 8601 with a Z, and Unix seconds. Month names in the long form are in English.
Can I get a random birthday?
Yes. Use a start and end that match the ages you need, for example 1960-01-01 and 2005-12-31, and the YYYY-MM-DD format. These are made-up dates and do not belong to anyone, so they suit test data.
Does it use my local time zone?
No. All dates and times are UTC, so the same range gives the same kind of result on every computer. Convert the times yourself if you need a local time zone.
About this tool
Values are made in your browser with crypto.getRandomValues and rejection sampling, so no value is favored, and nothing is sent anywhere or stored. Both the start and the end date are included. The date formats pick a random day; the formats with a time (hh:mm:ss, ISO 8601 and Unix seconds) pick a random second, from 00:00:00 on the start day to 23:59:59 on the end day. Everything is in UTC, not your local time zone, and dates follow the Gregorian calendar, including for years before 1582. Years from 1000 to 9999 are accepted. Dates are checked, so 2023-02-30 is refused. Repeats are possible, and the tool does not skip weekends or holidays.