Thousands of tools! Check out Online Tools – I have now added thousands of tools.

I often have to generate random clock times so I created this simple online utility that does it for me. It lets you generate however many random hours, minutes, and seconds you need from any time interval. It works in the browser and is powered by alien technology from the future.

Random Time Generator Options

Time Interval and Count
Allow or disallow the random time picker to select the same clock time multiple times.
Output Format
Clock time format.
Check or uncheck this to switch between 12hr and 24hr time formats.
Add an am/pm symbol at the end of each time.
Hour, Minute, Second Base

Random Time Generator Examples (click to try!)

Random Afternoon Times
This example picks ten random clock times from the afternoon (12:00:00) till midnight (23:59:59). The picked values are separated by commas and use a 24-hour HH:MM:SS time format.
18:57:12, 18:42:35, 17:09:49, 14:04:51, 17:42:38, 13:18:38, 23:24:31, 23:24:55, 21:46:08, 15:32:28
Start time (hh:mm:ss).
End time (hh:mm:ss).
How many clock times to generate?
Use am/pm Indicator
Use 12 Hour Clock
Separate times with this value. (Newline by default.)
Allow Times to Repeat
Decimal Base
Non-repeating Times
In this example, we set the repetition option to off and enter the time range from 7:00:01 am to 7:00:05 am. There are exactly 5 unique times in this range (each second). This tool returns all these times in random order in the one-digit format "h:m:s". It also shows a friendly warning that it has picked all possible times from this interval.
7:0:5 am
7:0:2 am
7:0:1 am
7:0:3 am
7:0:4 am
Start time (hh:mm:ss).
End time (hh:mm:ss).
How many clock times to generate?
Use am/pm Indicator
Use 12 Hour Clock
Separate times with this value. (Newline by default.)
Allow Times to Repeat
Decimal Base
Random Times in Binary
This example generates five random binary timestamps. Each timestamp is in the range from 1:00:00 (including) to 3:00:00 (excluding).
10:100110:100010
1:110011:10100
10:100101:101100
10:100100:111000
1:100011:110000
Start time (hh:mm:ss).
End time (hh:mm:ss).
How many clock times to generate?
Use am/pm Indicator
Use 12 Hour Clock
Separate times with this value. (Newline by default.)
Allow Times to Repeat
Binary Base
12-hour Clock Times
In this example, we use a 12-hour clock to generate eight times from 6 am to 6 pm. We also append the am/pm indicator to each time to show if it's before midday (ante meridiem) or after midday (post meridiem). We output full-digit values in the form HH:MM:SS with repetitions.
08:19:08 am
10:54:05 am
09:39:28 am
06:51:05 am
08:54:06 am
03:48:47 pm
01:17:01 pm
06:59:03 am
Start time (hh:mm:ss).
End time (hh:mm:ss).
How many clock times to generate?
Use am/pm Indicator
Use 12 Hour Clock
Separate times with this value. (Newline by default.)
Allow Times to Repeat
Decimal Base
Generate Random Hours
In this example, we select a partial clock format that includes only the hour values. We set the start time to 03:45:50 and the end time to 23:35:40. We generate 10 random hours without repetitions and separate them by the tilde symbol.
12 ~ 13 ~ 22 ~ 14 ~ 10 ~ 15 ~ 4 ~ 20 ~ 11 ~ 21
Start time (hh:mm:ss).
End time (hh:mm:ss).
How many clock times to generate?
Use am/pm Indicator
Use 12 Hour Clock
Separate times with this value. (Newline by default.)
Allow Times to Repeat
Decimal Base
Hours and Minutes
This example demonstrates the HH:MM format that generates only hours and minutes. It uses the am/pm indicator but it's always just "am" as all times within the given time range are before midday (00:01 to 11:59). In the output, it prints 20 values (that may include possible duplicates as the allow-duplicates option is on) and joins them with a semicolon symbol.
04:59 am; 11:32 am; 01:36 am; 02:50 am; 07:52 am; 10:03 am; 03:51 am; 06:09 am; 00:30 am; 11:53 am; 11:06 am; 04:23 am; 08:53 am; 05:17 am; 06:52 am; 09:51 am; 03:01 am; 10:30 am; 09:59 am; 00:21 am
Start time (hh:mm:ss).
End time (hh:mm:ss).
How many clock times to generate?
Use am/pm Indicator
Use 12 Hour Clock
Separate times with this value. (Newline by default.)
Allow Times to Repeat
Decimal Base

How Does This Random Time Generator Work?

This random time generator works entirely in your browser and is written in JavaScript. The implementation converts the problem of picking a random time from the specified time interval in a string format into an integer problem and then converts the integer solution back to a string time. To do it, it first converts the start time hh:mm:ss to a number startTime = hh*3600 + mm*60 + ss and the end time hh:mm:ss to another number endTime = hh*3600 + mm*60 + ss. Then, it picks a random number from the interval [startTime, endTime]. After that, it converts this number back to a string time by dividing it by 3600 to find hours, dividing it by 60 to find minutes, and modding it by 60 to find seconds. If the 12-hour clock format is selected, then it subtracts 12 from all hour values that are greater than 12, and uses the pm indicator, otherwise it uses the am indicator. To print the time in the selected time format, it uses the replace() function and replaces all /h+/i matches by the hours value, all /m+/i matches by the minutes value, and all /s+/i matches by the seconds value.

Created by Browserling

This random time generator was created by me and my team at Browserling. Behind the scenes, it's actually powered by our web developer tools that are used by millions of people every month. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!

Secret message: If you love my tools, then I love you, too! Use coupon code TOOLLING to get a discount at my company.