ISO 8601 Converter
ISO 8601 is the international standard for representing dates and times as unambiguous, sortable strings. This converter produces every common variant — extended, basic, week date, and ordinal — from any date, time, and timezone you select, and converts each one to its Unix timestamp so you can move between human-readable strings and epoch integers without manual arithmetic.
- Extended (most common)
- 2026-08-02T12:29:39+00:00
- yyyy-MM-ddTHH:mm:ssZ — RFC 3339 compliant
- Basic
- 20260802T122939+0000
- yyyyMMddTHHmmssZ — compact, no separators
- Week date
- 2026-W31-7
- yyyy-Www-D — ISO week numbering
- Ordinal date
- 2026-214
- yyyy-DDD — day of year (001–366)
- Unix (seconds)
- 1785673779
- seconds since epoch
Press 1–5 to copy a format • N for now
Format reference
| Variant | Pattern |
|---|---|
| Extended (date + time) | yyyy-MM-dd'T'HH:mm:ssZ |
| Extended (date only) | yyyy-MM-dd |
| Basic (date + time) | yyyyMMdd'T'HHmmssZ |
| Week date | yyyy-'W'ww-E |
| Ordinal date | yyyy-DDD |
| Time only | HH:mm:ss |
How to use
Pick a date and time
Use the date, time, and timezone inputs. All five ISO 8601 variants update automatically.
Choose your variant
Extended format is the most compatible. Use basic for compact storage, week date or ordinal for specialized systems.
Copy and use
Click any card to copy. Paste into your API, database query, or code. The Unix seconds card is always included for cross-format conversion.
Common pitfalls
Z and +00:00 are not string-equal
2026-05-09T18:00:00Z and 2026-05-09T18:00:00+00:00 represent the same moment but are different strings. String comparison will fail. Always parse before comparing.
Date-only strings are UTC, datetime strings without offset are local
In JavaScript, new Date("2026-05-09") gives midnight UTC. But new Date("2026-05-09T00:00:00") gives midnight local time. The two can differ by hours. Always include a timezone offset.
Fractional seconds precision varies
ISO 8601 allows fractional seconds (.SSS, .SSSSSS, etc.). Some APIs return milliseconds, others microseconds. If you store and retrieve from a database, ensure your parser handles varying precision, or truncate to the precision you need.
ISO week 1 is not always the first week of the year
ISO week numbering means January 1 can be in week 52 or 53 of the previous year. 2026-01-01 is in week 1 of 2026, but 2025-01-01 was in week 1 of 2025 (a Wednesday). Always use the ISO week year, not the calendar year, when working with week dates.
ISO 8601 and RFC 3339 in production APIs
ISO 8601 is not a single format but a family of related representations, and the variant
you almost certainly want for API work is the extended datetime format with a UTC offset:
2026-05-09T18:00:00Z. This is
also the form mandated by RFC 3339, the stricter internet profile that JSON APIs,
HTTP-based services, and OpenAPI specifications actually mean when they say "ISO 8601
date" — it requires a timezone designator, allows only the hyphenated extended layout, and
prohibits week and ordinal dates. The basic format,
20260509T180000Z, omits every
separator; it is rare in APIs but survives in calendar standards such as iCalendar and
vCard and in some legacy EDI systems. The week date,
2026-W19-6, and the ordinal
date, 2026-129, are more
specialized still: they fit systems whose natural unit of time is a calendar week or a day
of year, such as logistics planning, broadcast scheduling, and some financial reporting
contexts.
For maximum compatibility across databases (PostgreSQL, MySQL, SQLite), languages, and
cloud services, store timestamps as
Unix integers in seconds and format them as extended ISO 8601 only at the API boundary. The split decouples
storage from presentation: the integer sorts correctly, compares cheaply, and survives
every driver and serialization layer, while the string stays readable in payloads, logs,
and debugging sessions. Parsing in the other direction is where most production bugs live.
A datetime string without an offset is interpreted differently across runtimes —
JavaScript reads 2026-05-09 as
UTC midnight but
2026-05-09T00:00:00 as local
time — so attach Z or an explicit offset before any string crosses a process boundary.
This converter always attaches an explicit offset for that reason. Remember that Z and
+00:00 denote the same instant yet fail a string comparison, and that
fractional-second precision varies between milliseconds and microseconds from one API to
the next; the common pitfalls above walk through each of these failure modes.
Frequently asked questions
What is ISO 8601?
ISO 8601 is an international standard published by the International Organization for Standardization that defines how to represent dates, times, and intervals. It is the basis for many API specifications, database formats, and the RFC 3339 profile used in internet protocols. The extended format — 2026-05-09T18:00:00Z — is the most widely used variant.
What is the difference between ISO 8601 and RFC 3339?
RFC 3339 is a profile of ISO 8601 that is stricter in several ways: it always requires a timezone designator, uses only the extended (hyphenated) format, and prohibits week dates and ordinal dates. Most internet APIs and the HTML <input type="datetime-local"> element use RFC 3339. If someone says "ISO 8601 date," they usually mean RFC 3339.
What does the Z at the end of a timestamp mean?
The "Z" is the UTC timezone designator, short for "Zulu time" from the NATO phonetic alphabet. 2026-05-09T18:00:00Z is equivalent to 2026-05-09T18:00:00+00:00. Some systems accept only Z while others accept +00:00 — they are semantically identical, but a string comparison will not match them.
What happens if I omit the timezone offset in an ISO 8601 string?
The behavior is implementation-defined and differs across languages. JavaScript's Date.parse() treats a date-only string (2026-05-09) as UTC, but a datetime string without a timezone (2026-05-09T18:00:00) as local time — a common source of off-by-hours bugs. Always include a timezone designator when representing an absolute point in time.
What is a week date in ISO 8601?
ISO 8601 defines a week-based calendar where weeks start on Monday. The first week of the year (W01) is the week containing the first Thursday of the year. The format is YYYY-Www-D, where ww is the week number (01–53) and D is the day of week (1 = Monday, 7 = Sunday). Week dates are used in some European business contexts.