Generate random date

Sample valid ISO calendar dates independently from an inclusive start-to-end interval.

freeworks offlinenothing uploaded
ToolRandom Date Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Each YYYY-MM-DD input is parsed at UTC midnight and converted back to the same spelling, which rejects impossible dates that JavaScript would otherwise normalise. The inclusive UTC-day span becomes an integer range, and rejection sampling chooses one offset separately for every output row.

Formula
inclusive day span = end UTC day − start UTC day + 1
  • One output row is the default and the upper bound is 1,000 generated dates.
  • Both calendar bounds are explicit; blank seed selects Web Crypto and seed text selects replayability.

Worked example

Three dates in 2026
Input
											Start date: 2026-01-01
End date: 2026-12-31
Count: 3
Seed: planning
										
Output
												2026-07-19
2026-06-07
2026-07-24
											

When to use this

Database suites generate date-only fixtures inside schema bounds, research exercises sample observation days, and planning workshops draw prompts from one project window.

Edge cases

  • 2026-02-30 has the correct shape but fails calendar round-trip validation instead of becoming a March date.
  • Identical start and end values define a one-day interval, so every sample necessarily equals that date.
  • Independent sampling is with replacement, which means the same valid day may appear more than once.

References