Random ISO 8601 Duration Generator
Includes calendar and time components, e.g. P1Y6M or P2DT3H.
ISO 8601 duration generated locally in your browser with the Web Crypto API.
ISO 8601 durations for APIs and fixtures
Generate a random, syntactically valid ISO 8601 duration in the P…T… period format — strings like PT45M, P2DT3H, or P1Y6M that show up in video lengths, subscription and billing periods, retention windows, and schema-validated config.
Zero-valued components are omitted so every value stays canonical, and the T separator only ever appears when a time component follows it. Enable time only for the PT… shape that most APIs expect.