FormatterHQ

Random Date Generator

Generate random dates between any two dates in ISO, US, European, long, Unix timestamp or RFC 2822 format. Perfect for test data, birthdays and schedules.

Loading tool…
Ready.

How to use the Random Date Generator

  1. Enter a start date and an end date in YYYY-MM-DD format.
  2. Choose an output format, for example ISO 8601 or US (MM/DD/YYYY).
  3. Set how many dates to generate and whether to sort them chronologically.
  4. Generate and copy the dates.

Random date generator for test data and planning

The random date generator picks days uniformly between a start and end date, both inclusive. Choose a format that includes a time and it picks a random moment instead, down to the millisecond. Dates are calculated in UTC, so results are the same wherever you are and never shift because of daylight saving time.

Output formats

FormatExampleTypical use
Date (ISO)2027-03-14Databases, APIs, sortable file names
Date and time2027-03-14 16:05:42SQL DATETIME columns
ISO 86012027-03-14T16:05:42.318ZJSON payloads, JavaScript
US03/14/2027US-style forms and spreadsheets
European14/03/2027UK, EU and many other locales
LongMarch 14, 2027Human-readable text
Unix timestamp1805040342Seconds since 1970-01-01 UTC
RFC 2822 / HTTPSun, 14 Mar 2027 16:05:42 GMTHTTP headers, emails

Practical uses

  • Seeding databases – realistic creation dates for orders, users or blog posts.
  • Birthdays – set a range such as 1960-01-01 to 2005-12-31 for adult customers in demo data.
  • Testing date logic – leap days (February 29), month ends, year boundaries and time-zone conversions are common sources of bugs. Random dates across several years hit these cases naturally.
  • Scheduling – spread audits, reminders or spot checks randomly across a quarter.

Things to watch for

  • Ambiguous formats.03/04/2027 means March 4 in the US and April 3 in Europe. Prefer ISO 8601 when data moves between systems.
  • Time zones. The ISO and RFC outputs are explicitly UTC. If your app displays local time, the calendar day may differ from the UTC day near midnight.
  • Unix timestamps are in seconds. JavaScript's Date expects milliseconds, so multiply by 1000. You can check any timestamp with the Unix timestamp converter.

Choosing a sensible range

Match the range to the data you are simulating. Order dates for a shop that opened last year should not start in 1990, and account creation dates should not lie in the future. A realistic range makes charts, reports and filters in your demo behave like they will in production.

Sorting and repeatability

Turn on sorting to get the dates in chronological order, which is handy for timelines, transaction histories and log files. Each run produces a new random set, so save the output if you need to reproduce the same test later.

Need a time of day without a date? Use the random time generator. To calculate the gap between two dates, try the date and time calculator.

Frequently asked questions

Are the start and end dates included?
Yes. Both dates can be generated. For formats that include a time, the random moment can fall anywhere from the start of the first day to the start of the end date.
Which time zone are the dates in?
All dates are calculated in UTC. Formats like ISO 8601 and RFC 2822 state this explicitly with Z or GMT, and the plain date formats show the UTC calendar day.
Can I generate dates before 1970?
Yes. Any valid date range works, for example 1900-01-01 to 1950-12-31. Unix timestamps before 1970 are negative numbers.
How do I get random birthdays for adults?
Set the start date about 80 years ago and the end date 18 years ago, choose the date format you need and generate. The results are evenly spread across that range.
How do I generate a random date in code?
Convert both ends of the range to timestamps and pick a number in between. In JavaScript: new Date(start.getTime() + Math.random() * (end - start)). In PostgreSQL, DATE '2024-01-01' + (random() * 365)::int adds a random number of days to a start date. Remember that JavaScript dates are in milliseconds while Unix timestamps are in seconds.

Last updated September 26, 2026

Related tools