Random time generator — random times of day within your hours

Choose a window such as 9 to 17, how the minutes should be rounded, and how many times you need, and the tool lists random clock times inside that window.

Live demo · real result from this tool
The window ends at the start of this hour.
Format

Press Generate to create a result.

Processed on your device — nothing is uploaded.

How to use the random time generator

  1. Set From hour (0 to 23) and To hour (1 to 24). The window stops at the start of the To hour.
  2. In Snap minutes to, choose Any minute, 5 minutes, 15 minutes or 30 minutes.
  3. Pick a Format: 24-hour (14:30) or 12-hour (2:30 PM).
  4. Enter How many times you need, up to 500, and leave Sort ticked to list them from earliest to latest.
  5. Press Generate and copy the list.

What it does and when to use it

Use it to plan random check-in or reminder times during a work day, set unpredictable times for a class quiz or a fire-drill exercise, pick a time slot for a game round, or fill a test spreadsheet with clock times. Snapping to 15 or 30 minutes gives times that fit a calendar; Any minute is better when the times should feel unplanned.

Pair it with the random date generator to get full date-and-time stamps. For a countdown to one of the times you draw, use the countdown timer. If you only need a number, the random number generator is simpler.

How it works

The tool turns the window into a list of possible start times. From 9 to 17 is eight hours, or 480 minutes. With 15-minute steps that gives 32 slots: 09:00, 09:15 and so on up to 16:45. With Any minute it is 480 slots.

For each time, it picks one slot with crypto.getRandomValues, using rejection sampling so every slot has exactly the same chance. Slots are drawn independently, so a time can come up more than once. Sort puts the list in clock order, and the 12-hour format writes midnight as 12:00 AM and noon as 12:00 PM.

Worked examples

Default settings. From hour 9, To hour 17, 15-minute steps, 5 times, sorted. One run gave 09:00, 10:30, 12:00, 15:15, 16:45. Every result is on a quarter hour, and none is 17:00 or later.

The last hour before midnight. From hour 23 to 24, 30-minute steps, 12-hour format, 3 times. There are only two slots, 11:00 PM and 11:30 PM, so with three draws at least one time must repeat. One run gave 11:00 PM, 11:00 PM, 11:30 PM.

An empty window. From hour 12 and To hour 12 returns “The end hour must be after the start hour.”

Limits and tips

  • Times have no date and no time zone; they are plain clock times.
  • Seconds are not generated. The smallest step is one minute.
  • To avoid repeats, make sure the window has many more slots than the number of times you ask for.
  • Everything is generated in your browser.

Frequently asked questions

Can the To hour itself come up?
No. The window ends at the start of the To hour. With From hour 9 and To hour 17 and 15-minute steps, the latest possible time is 16:45, and 17:00 never appears.
How do I get times through the whole day?
Set From hour to 0 and To hour to 24. Choose Any minute for all 1,440 minutes of the day.
Can the window cross midnight, for example 22:00 to 02:00?
Not in one go, because the end hour must be after the start hour. Run it twice, once for 22 to 24 and once for 0 to 2, and combine the lists.
Why does the same time appear twice?
Each time is drawn independently and there is no no-repeats option. A narrow window with large steps has few possible times, so repeats are likely. Widen the window or choose smaller steps.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close