Random date generator

Generate random dates or timestamps between any two dates, in the format your code or database wants: ISO 8601, SQL, Unix time or the HTTP date format.

runs in your browser · nothing uploaded

loading tool…

How to use it

  1. Set the start and end dates. Both days are included.
  2. Choose a format, and tick weekdays only or sort if you need them.
  3. Set how many, then copy or download.

Formats

ISO 8601 with a Z (2024-03-09T14:05:33Z) is the safest for JSON and APIs, because it carries its time zone. SQL datetime (2024-03-09 14:05:33) pastes straight into PostgreSQL, MySQL and SQLite. Unix seconds are what most backends and JWT claims use, JavaScript's Date uses milliseconds, and the HTTP format is what Date and Last-Modified headers use.

All times are UTC. That avoids the hour that doesn't exist, or happens twice, when clocks change for daylight saving.

Questions

Is anything sent to a server?

No. The data is generated in your browser and nothing you set or generate is uploaded or stored by us.

Are the dates evenly spread?

Yes. Every millisecond in the range is equally likely, so every day is too. "Weekdays only" draws again whenever it lands on a Saturday or Sunday.