Random Date Generator
Use the CaseSwitch Random Date Generator to sample calendar dates uniformly between a start and end (inclusive), formatted as YYYY-MM-DD. Sampling uses `crypto.getRandomValues()`. Dates are for fixtures and demos — not legal deadlines.
Written by the CaseSwitch editorial team. We maintain these tools in the browser so drafts, keys, and images stay on your device.
Last reviewed: 23 July 2026
Uses secure browser randomness when available. Nothing is sent to a server.
Examples
Sample output shape — five dates in range
Input
start: 2020-01-01 · end: 2020-12-31 · quantity: 5
Output
(illustrative — each run differs) 2020-03-17 2020-11-02 2020-01-09 2020-07-22 2020-05-30
Inclusive single-day range
Input
start: 2024-06-15 · end: 2024-06-15 · quantity: 3
Output
2024-06-15 2024-06-15 2024-06-15
Error shape — inverted range
Input
start: 2030-01-01 · end: 2020-01-01
Output
Start date must be before end date.
Error shape — invalid ISO
Input
start: 2024-13-40
Output
Enter valid start and end dates in YYYY-MM-DD format.
Sample use — mock signup dates
Input
start: 2018-01-01 · end: 2024-12-31 · quantity: 2
Output
(illustrative) 2019-08-14 2023-02-01
How to use
- Set start and end dates in YYYY-MM-DD form (end must be on or after start).
- Choose how many dates to generate.
- Copy the newline-separated ISO dates into your fixtures or spreadsheet.
What this tool is for
Produce one or many random civil dates inside a range you set (defaults 2000-01-01 through 2030-12-31). Useful for QA datasets, mock “joined at” fields, and classroom timeline exercises. Output is date-only ISO strings, not timestamps with a clock time.
How it works
Start and end must be valid ISO dates. The tool converts each bound to a UTC day index, draws an inclusive integer day with secure randomness, and formats back to YYYY-MM-DD. Quantity defaults to five (up to 100). Inverted ranges and invalid strings return clear errors.
When to use it
Seed data for demos, spreading fake events across a year, and teaching inclusive date ranges. Pair with your own time-of-day if you need full timestamps.
When not to use it
Legal deadlines, medication schedules, and anything where weekends or holidays must be excluded unless you filter after the fact. Astrology and “lucky day” products.
How it compares to related tools
The Random Month Generator returns English month names only. Roman numeral date tools convert a known date’s display form — they do not sample. The Random Number Generator is not calendar-aware.
Common mistakes
Swapping min/max, assuming uniform dates imply uniform weekdays after you drop weekends, and treating the illustrative samples in docs as fixed outputs of the button.
UTC date-only semantics
Parsing and formatting use UTC midnight boundaries so the calendar day does not shift with your local timezone for valid ISO inputs. There is no hour or minute component in the output. Add a time in your own script if you need timestamps.
Uniform days, not uniform weekdays
Every calendar day in the inclusive span is equally likely. If you later remove Saturdays and Sundays, the remaining distribution is no longer uniform over weekdays unless you designed for that. Holidays are not excluded automatically.
Frequently asked questions
What date format is the output?+
YYYY-MM-DD (ISO-like). Convert for display afterward if you need US slashes or localized names.
Are times included?+
No. This tool is date-oriented. Combine with a separate time if you need a full timestamp.
Are start and end inclusive?+
Yes. Both bounds can appear in the results.
Is sampling cryptographically random?+
Day indices are chosen with `crypto.getRandomValues`-backed secure integer sampling.
Can I get unique dates only?+
Not as a dedicated mode — duplicates can appear, especially in short ranges with high quantity. Deduplicate afterward if needed.
Default range?+
If you leave defaults alone, the UI starts at 2000-01-01 and ends at 2030-12-31.
Are these values cryptographically secure?+
Random generators use crypto.getRandomValues() in your browser for secure randomness where supported.
Related tools
Random Month Generator
Classroom games, dummy season copy, picking a reporting month for a mock chart, and icebreaker prompts.
Random Number Generator
Classroom raffles, load-test IDs, sprint poker numbers, Monte Carlo toy demos, and filling numeric columns in mock CSV. Document the range if the result matters later.
Roman Numeral Date Converter
Wedding stationery, monument-style graphics, teaching Roman numerals with a date students care about, and decorative captions where Arabic digits feel too modern.