Random Duration Generator
Generates a random duration between 1 second and 12 hours, formatted as hours, minutes and seconds — useful for placeholder data, estimates or games.
What this generator does
Produces a length of time rather than a point in time, for filling fields that measure how long something took.
How to use this tool
- Press generate for a random duration.
Worked examples
- Format
- 1h 42m 7s — hours appear only once they're non-zero, minutes appear whenever there is an hour or a minute, and seconds always appear
Common use cases
- Placeholder data for scheduling apps
- Estimating a random task length for a game
- Testing duration-formatting code
How this generator works
A whole number of seconds is drawn between 1 and 43,200 (12 hours) — the range is fixed and not user-adjustable — then split into hours, minutes and seconds. The conversions are exact integers rather than rounded decimals, which is why 90 minutes reads as 1h 30m 0s rather than 1.5 hours, and the seconds component always appears even when it's zero.
Limitations and good to know
- A duration, not a time of day and not a date range: it says how long, never when.
- Nothing accounts for calendar irregularities. Adding a generated duration to a real timestamp across a daylight-saving change will not give the answer arithmetic on the clock suggests.
- The draw is uniform between the bounds, so a duration near the middle is no more likely than one at either extreme.
Related generators
- Random Timestamp GeneratorA random ISO-8601 timestamp between 2020 and 2030, for test data or placeholders.
- Random Date Range GeneratorA start and end date pair, 3 to 30 days apart.
- Timestamp Sequence GeneratorGenerate an ordered run of timestamps at a set interval, with optional jitter, in ISO, epoch, SQL or date-only format.