Generate random dates between any two dates
The Random Date Generator picks random calendar dates between a start and end date you choose — one date or up to 1,000 at once. Add a random time of day, keep to weekdays only, make every date unique, sort them, and output them in ISO 8601, your local format, a long written form, Unix timestamps or your own token pattern.
It is built for developers and testers who need realistic dates of birth, order dates or timestamps for seed data; for teachers setting date-arithmetic exercises; for researchers sampling days to audit; and for anyone who wants a random date for a draw, a theme or a “what happened on this day” game.
Each date is drawn uniformly from the days in your range using the browser’s cryptographic random source, so no month, year or weekday is favoured. The tool works offline and nothing you enter leaves your device.
How to use the Random Date Generator
- Set the From date and To date. Both ends are included in the range.
- Enter How many dates you need (1–1,000).
- Pick an Output format — ISO, locale, long, DD/MM/YYYY, MM/DD/YYYY, with weekday, Unix, or Custom tokens such as
DD MMM YYYY, HH:mm. - Tick Include a random time of day, Weekdays only, No duplicate dates and Sort oldest first as needed.
- Press Generate dates, then Copy list or Download CSV (with ISO, weekday and Unix columns).
Random Date Generator features
Uniform over the whole range
The generator picks a day offset with crypto.getRandomValues and rejection sampling, so a 31-day month is exactly 31/365 of a year’s draws — no bias toward any month or year.
Weekdays only
Skip Saturdays and Sundays for business-day test data such as invoice or shipping dates.
Unique and sorted
Guarantee no repeated dates (with a clear message if you ask for more dates than the range contains) and sort the result chronologically.
Random times
Add a time of day down to the second, evenly spread across the 24 hours, for timestamps and log data.
Eight output formats
ISO 8601, your browser locale, long text, DD/MM/YYYY, MM/DD/YYYY, date with weekday, Unix seconds, or custom tokens including month and day names and 12-hour time.
CSV export
Every row carries the formatted date plus ISO, weekday and Unix columns, so it imports cleanly into Excel, Google Sheets or a database.
Custom format tokens
Choose “Custom tokens…” and build any pattern. Tokens are replaced; everything else, such as commas, slashes and words, is kept as typed.
| Token | Meaning | Example (Tuesday 9 March 2024, 14:05:09) |
|---|---|---|
| YYYY / YY | Year, four or two digits | 2024 / 24 |
| MMMM / MMM / MM / M | Month name, short name, two-digit, plain | March / Mar / 03 / 3 |
| DDDD / DDD / DD / D | Weekday name, short weekday, two-digit day, plain day | Saturday / Sat / 09 / 9 |
| HH / H / hh / h | Hour: 24-hour padded, 24-hour, 12-hour padded, 12-hour | 14 / 14 / 02 / 2 |
| mm / ss | Minutes and seconds, padded | 05 / 09 |
| A / a | AM/PM marker | PM / pm |
Which date format should I use?
ISO 8601 (YYYY-MM-DD) is unambiguous, sorts correctly as plain text and is accepted by every database and programming language — use it for anything a computer will read. DD/MM/YYYY is standard in India, the UK, Australia and most of Europe; MM/DD/YYYY is used in the United States. A date like 03/09/2024 means 3 September in one and 9 March in the other, which is exactly why ISO exists.
Unix timestamps count seconds since 1 January 1970 UTC and are handy for APIs; convert one back with the Unix Timestamp Converter. Dates here are treated as calendar dates without a time zone, so a random “2024-03-09” is the same day everywhere.
Tips for test data
- For dates of birth of adults, set From to about 80 years ago and To to 18 years ago; the Age Calculator checks any result.
- For order or event histories, tick Sort oldest first and Include a random time to get a plausible timeline.
- Tick Weekdays only for banking, payroll or delivery data; to count working days between two of the results, use the Business Days Calculator.
- Leap days are included naturally — 29 February appears only in ranges that contain a leap year.
Random Date Generator FAQ
How does the random date generator choose dates?
It counts the days in your range, picks a random offset with the browser’s cryptographic random number generator (using rejection sampling to avoid bias), and adds it to the start date. Every day in the range, including both ends, has the same chance.
Can I generate random dates for a specific year or month?
Yes. Set From and To to the first and last day of the year or month. For example, 2024-01-01 to 2024-12-31 gives random dates in 2024 — including 29 February, since 2024 is a leap year.
Why does it say I can’t have that many unique dates?
With “No duplicate dates” ticked, you cannot ask for more dates than there are days (or weekdays) in the range. Widen the range, lower the count, or untick the option to allow repeats. Adding random times lets dates repeat because the times differ.
Are the random times in my time zone?
The dates and times are plain calendar values with no time zone attached — a generated 2024-03-09 14:05 is just that text. The Unix timestamp column treats them as UTC.
Can I generate random dates of birth?
Yes. Choose a From date around the oldest age you need and a To date around the youngest, for example 1950-01-01 to 2006-12-31 for adults aged roughly 18 to 75 in 2025.
Is anything uploaded?
No. Date generation, formatting and CSV creation all happen in your browser.