Skip to content
API developer toolReviewed against IETF RFC 3339 (Klyne & Newman, 2002)

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.

Grammar
RFC 3339 §5.6
Year range
0000–9999
Offsets
Z · ±HH:MM
Use case
OpenAPI · JSON · gRPC

Quick Conversion

Formula: ms = seconds × 1000

RFC 3339 grammar diagramThe §5.6 ABNF grammar laid out as a railroad-style diagram showing date, T, time, secfrac, and offset.RFC 3339 §5.6 date-time grammarfull-dateYYYY-MM-DDTseppartial-timeHH:MM:SStime-secfrac.ssstime-offsetZ or ±HH:MMVALID RFC 3339 PROFILEdate-time = full-date "T" full-time
Valid RFC 3339 datetime.
Canonical (Z)
2024-05-30T01:00:00.000Z
Offset-preserving
2024-05-30T01:00:00.000Z
Unix epoch (s)
1717030800
Unix epoch (ms)
1717030800000
RFC 2822
Thu, 30 May 2024 01:00:00 GMT

Edge-case gallery

ISO 8601 vs RFC 3339 — what changed

AspectISO 8601-1:2019RFC 3339:2002
SeparatorT or spaceT (or t) — space only with agreement
Offset requiredNo — Z optionalYes — Z or ±HH:MM mandatory
Ordinal dateYes (2024-151)No
Week dateYes (2024-W22-4)No
Year > 9999Yes (extended)No (4 digits only)
Negative yearsYes (8601-2)No
Leap second (:60)PermittedPermitted
−00:00 distinctSame as +00:00Means 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-time

Worked: 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

  1. 1Paste your candidate string — anything from a JSON payload, a log line, an OpenAPI example.
  2. 2Toggle strict mode ON to treat warnings (space separator, lowercase z, −00:00) as hard failures.
  3. 3Inspect the error list — each bullet cites the §5.6 grammar element it violates.
  4. 4If valid, copy the canonical UTC form (Z-suffix) or the offset-preserving form, depending on your consumer.
  5. 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.

RFC 3339 FAQs

Have more questions? Contact us

Trusted by backend, SRE, DBA and analytics teams

4.9
Based on 5,410 reviews

Our OpenAPI spec demands RFC 3339. This validator catches missing Z and bad offsets before code review.

O
Olivia Park
Backend engineer, Seattle SaaS
April 25, 2026

Strict mode flags the -00:00 vs +00:00 nuance I needed to explain to a junior. Top-tier tool.

Y
Yuki Hashimoto
DevOps SRE, Tokyo
March 12, 2026

PostgreSQL parses any ISO, but my Python ingestor only accepts RFC 3339. This bridges the two cleanly.

C
Carl Eriksson
Database administrator, Stockholm
May 1, 2026

Pasting historical exports and seeing what's RFC 3339-valid vs warning is a daily productivity boost.

N
Nadia Sayed
Data analyst, Cairo retail
February 8, 2026

Love using our calculator?

Related developer tools

Learn More

Related Articles

Dive deeper with our expert guides and tutorials related to RFC 3339 Datetime Validator & Converter

Loading articles...