1001Ferramentas
⏱️Validators

ISO 8601 Time Strict Validator

Strictly validate an ISO 8601 duration string (like P1Y2M10DT2H30M). Useful for APIs, scheduling, videos and any field using the ISO duration standard.

Checking ISO 8601 strings before they break

The API sent back PT1H30M and your parser threw. Or you posted 2026-05-10 12:00 with a space in the middle and the endpoint rejected it without saying why. Pasting the string here answers the shape question fast: green or red, updating as you type, with no button to press and nothing to configure first.

Two shapes pass. One is a full date-time, YYYY-MM-DDTHH:MM:SS, with optional fractional seconds and a mandatory offset, either Z or something like -03:00. The other is a duration starting with P, carrying years, months and days, then hours, minutes and seconds after the T. Plenty of things people expect to pass come back red: a bare 2026-05-10, local time with no offset, lowercase t or z, a decimal comma, and week durations like P1W.

The catch worth knowing: this checks shape, not calendars. The string 2026-13-45T99:99:99Z reads as valid, because month 13 and hour 99 still fit the digit pattern. A lone P with no components also passes, even though ISO requires at least one. Treat the page as a typo and mask check, and leave range validation to whatever library actually parses the value. Nothing leaves your browser.

Frequently asked questions

Why does 2026-05-10 come back invalid?
This page requires a date and a time together, with an offset. A date on its own is valid ISO 8601, but it falls outside the pattern being tested here.
Does it accept week durations such as P2W?
No. The pattern covers years, months, days, hours, minutes and seconds, and rejects the week form, which is also part of the standard.
Does green mean the date really exists?
No. It only means the digits sit in the right positions. A 31 February passes without complaint, and checking whether the day exists is the parser's job.

Related Tools