RFC 3339 Datetime Validator & Converter
RFC 3339 is the IETF's strict subset of ISO 8601 — the format every JSON API should emit. This tool validates against the §5.6 grammar, flags warnings (lowercase t, space separator, −00:00), and converts between RFC 3339, full ISO 8601, and Unix epoch.
Quick Conversion
Formula: ms = seconds × 1000
Edge-case gallery
ISO 8601 vs RFC 3339 — what changed
| Aspect | ISO 8601-1:2019 | RFC 3339:2002 |
|---|---|---|
| Separator | T or space | T (or t) — space only with agreement |
| Offset required | No — Z optional | Yes — Z or ±HH:MM mandatory |
| Ordinal date | Yes (2024-151) | No |
| Week date | Yes (2024-W22-4) | No |
| Year > 9999 | Yes (extended) | No (4 digits only) |
| Negative years | Yes (8601-2) | No |
| Leap second (:60) | Permitted | Permitted |
| −00:00 distinct | Same as +00:00 | Means UTC, unknown local |
Need more flexibility? ISO 8601 converter.
RFC 3339 §5.6 ABNF
date-fullyear = 4DIGIT
date-month = 2DIGIT ; 01-12
date-mday = 2DIGIT ; 01-28, 29, 30, 31
time-hour = 2DIGIT ; 00-23
time-minute = 2DIGIT ; 00-59
time-second = 2DIGIT ; 00-58, 59, or 60 (leap)
time-secfrac = "." 1*DIGIT
time-offset = "Z" / time-numoffset
time-numoffset = ("+" / "-") time-hour ":" time-minute
date-time = full-date "T" full-timeWorked: 2024-05-30T01:00:00.000Z — date-fullyear=2024, date-month=05, date-mday=30, T, 01:00:00, .000, Z.
How to validate an RFC 3339 datetime
- 1Paste your candidate string — anything from a JSON payload, a log line, an OpenAPI example.
- 2Toggle strict mode ON to treat warnings (space separator, lowercase z, −00:00) as hard failures.
- 3Inspect the error list — each bullet cites the §5.6 grammar element it violates.
- 4If valid, copy the canonical UTC form (Z-suffix) or the offset-preserving form, depending on your consumer.
- 5Save the snapshot so you can re-validate the same string later or pull it into a test fixture.
From ISO 2014 to OpenAPI 3.1 — the rise of RFC 3339
In 2026 a backend engineer writing a JSON schema for a public API has exactly one acceptable datetime format: RFC 3339. Anything else fails OpenAPI 3.1 validators, breaks Stripe's SDK, and confuses Cloudflare's log shipper. This validator catches the slip before code review.
The story starts in 1971 with ISO 2014, the first international YYYY-MM-DD spec. ISO 8601 unified date and time in 1988, refined in revisions through 2019. ISO 8601 is comprehensive but also too permissive for the wire — it allows three different date forms (calendar, ordinal, week-based), optional offsets, and 6-digit years.
In 2002 Graham Klyne (Nine by Nine) and Chris Newman (Sun Microsystems, later Oracle) authored RFC 3339 to cut ISO 8601 down to an interoperable, internet-safe core. They mandated the T separator, required explicit offsets, and dropped ordinal and week-date forms. The result was a regex-grammable, sortable, parseable subset.
RFC 3339 immediately became the foundation. IETF protocols XML-Schema xs:dateTime (2004), Atom (RFC 4287, 2005), Activity Streams (RFC 8262, 2017) all reference RFC 3339. JSON Schema's `date-time` format keyword is defined exactly as RFC 3339. OpenAPI 3.1 inherits the same.
The strictness pays off in databases. PostgreSQL's timestamptz parses RFC 3339 natively; BigQuery's TIMESTAMP() function accepts it without conversion; Snowflake's TIMESTAMP_TZ uses it as the canonical external format. Go's standard library hardcodes time.RFC3339 and time.RFC3339Nano. Rust's chrono offers .to_rfc3339().
The leap-second quirk: RFC 3339 §5.6 explicitly allows :60 as the seconds field to represent the leap second insertion. In practice, the IERS has inserted 27 leap seconds since 1972 (last was 2016-12-31). The International Telecommunication Union voted in November 2022 to abolish leap seconds by 2035, so the :60 corner case is finally on its way out.
The lesson: emit RFC 3339 from every JSON endpoint, validate at the boundary, and reach for the broader ISO 8601 converter only when you need ordinal or week-date forms internally. This tool is the boundary check.
Trusted by backend, SRE, DBA and analytics teams
“Our OpenAPI spec demands RFC 3339. This validator catches missing Z and bad offsets before code review.”
“Strict mode flags the -00:00 vs +00:00 nuance I needed to explain to a junior. Top-tier tool.”
“PostgreSQL parses any ISO, but my Python ingestor only accepts RFC 3339. This bridges the two cleanly.”
“Pasting historical exports and seeing what's RFC 3339-valid vs warning is a daily productivity boost.”
Love using our calculator?
Related developer tools
Related Articles
Dive deeper with our expert guides and tutorials related to RFC 3339 Datetime Validator & Converter