What is ISO 8601?
ISO 8601 is the international standard for representing dates and times as strings. Its core form is YYYY-MM-DDTHH:MM:SS±hh:mm — for example 2026-04-30T12:34:56Z. The standard was first published in 1988 and is now the default datetime format for JSON APIs, OpenAPI, GraphQL Scalars, SQL TIMESTAMP types, JavaScript JSON.stringify, and almost every modern protocol.
Is RFC 3339 the same as ISO 8601?
RFC 3339 is a strict subset of ISO 8601 designed for the internet. It mandates the four-digit year, hyphen-separated date, the literal T separator (or a space), seconds precision, and an explicit Z or ±hh:mm offset. ISO 8601 also permits forms RFC 3339 forbids: week dates (2026-W18-5), ordinal dates (2026-121), basic format without separators (20260430T123456Z), and reduced precision. When a spec says "ISO 8601" they almost always mean the RFC 3339 subset.
Are week dates and ordinal dates supported?
They are valid in the ISO 8601 spec — 2026-W18-5 (Friday of week 18) and 2026-121 (the 121st day) — but the JavaScript Date constructor and most JSON libraries do not parse them. This validator flags both forms with a note explaining they are spec-valid but parser-incompatible. If you need round-trip support, convert them to the calendar form (YYYY-MM-DD) first.
How are timezones represented in ISO 8601?
Three forms are valid. Z (uppercase) means UTC. +hh:mm or -hh:mm gives the offset from UTC (e.g. +05:30 for India, -05:00 for US Eastern Standard). The basic form ±hhmm without a colon is allowed by ISO 8601 but RFC 3339 requires the colon. A datetime without any offset is a "local" time — RFC 3339 forbids this; pure ISO 8601 allows it but it is ambiguous and usually a bug.
Why does my date string fail?
The most common causes: slashes instead of hyphens (2026/04/30), single-digit month or day (2026-4-3), missing zero padding in the time (12:34:5), missing offset on a datetime (2026-04-30T12:34:56), an invalid month (2026-13-01), or an impossible day (2025-02-29 is not a leap year). The validator returns an exact reason for each failure so you can fix it without guessing.
What is the most strict ISO 8601 format?
The strictest internet-safe form is RFC 3339 with extended format and UTC: YYYY-MM-DDTHH:MM:SSZ — e.g. 2026-04-30T12:34:56Z. Add fractional seconds for sub-second precision: 2026-04-30T12:34:56.789Z. This is what JSON.stringify(new Date()) emits, what JWT recommends for iat/exp claims expressed as strings, and what every well-designed API should send.
How does fractional seconds precision work?
ISO 8601 allows any number of digits after the decimal point on the seconds component — 2026-04-30T12:34:56.123 (ms), .123456 (μs), .123456789 (ns). RFC 3339 Section 5.3 allows arbitrary precision but recommends ms or μs for portability. The JavaScript Date object truncates after the third digit — anything beyond is silently dropped. This validator preserves the original string but reports parsed values to ms precision.
Are leap seconds supported?
ISO 8601 and RFC 3339 both allow second values of 60 to represent an inserted leap second (e.g. 2016-12-31T23:59:60Z). In practice, no major programming language Date type stores 60 — they coerce to 00 of the next minute or simply reject the input. This validator accepts second=60 as syntactically valid but warns that downstream parsers will likely reject it. Most production systems handle leap seconds via NTP smearing rather than a literal 60th second.