ISO 8601 Formatter

ISO 8601 Date Formatter

Convert dates to and from ISO 8601 international standard format.

ISO 8601 Format

-
UTC -
With Offset -
Basic Format -

Convert time durations to/from ISO 8601 duration format (e.g., P1Y2M3DT4H5M6S)

ISO 8601 Duration

P0D

-

ISO 8601 Format Reference

Format Example Description
Date2024-01-15Calendar date (extended format)
Date (basic)20240115Calendar date (basic format)
Time14:30:00Local time
DateTime2024-01-15T14:30:00Combined date and time
UTC2024-01-15T14:30:00ZDate/time in UTC (Zulu)
With Offset2024-01-15T14:30:00+05:30Date/time with timezone offset
Week2024-W03Week number
Week Day2024-W03-1Week with day (1=Monday)
Ordinal2024-015Year and day of year
DurationP1Y2M3DT4H5M6S1 year, 2 months, 3 days, 4 hours, 5 minutes, 6 seconds
Horizontal Banner (Responsive) 728x90 / 320x100

How to Use This Tool

  1. Format a Date: Select a date and time using the pickers, then choose your desired format (full with timezone, date only, time only, week number, or ordinal date). Click "Format to ISO 8601" to generate the standardized string.
  2. Parse ISO String: Switch to the "Parse ISO String" tab and paste any ISO 8601 formatted date. The tool breaks it down into components and shows the equivalent local time representation.
  3. Create Durations: Use the "Duration" tab to build ISO 8601 duration strings (P1Y2M3DT4H5M6S format). Specify years, months, days, hours, minutes, and seconds for interval representations.
  4. Copy Results: Click the copy button next to any output to copy the formatted string. Use these in API requests, database fields, or configuration files requiring ISO 8601 compliance.

Technical Details

ISO 8601 is the international standard for date and time representation, published by the International Organization for Standardization. The basic format is YYYY-MM-DDTHH:MM:SS.sssZ, where T separates date from time, and Z indicates UTC. Timezone offsets use ±HH:MM format (e.g., +05:30 for India).

The standard supports multiple representations: calendar dates (2024-03-15), week dates (2024-W11-5 for Friday of week 11), and ordinal dates (2024-075 for the 75th day). Durations use the P[n]Y[n]M[n]DT[n]H[n]M[n]S format—P1Y2M3D means 1 year, 2 months, 3 days. Time intervals can be expressed as start/end, start/duration, or duration/end. ISO 8601 sorts lexicographically, meaning string sorting produces chronological order—a key advantage for database indexing and log file analysis.

Common Mistakes to Avoid

  • Omitting the Timezone Indicator: "2024-03-15T10:00:00" is ambiguous—is it UTC or local? Always include Z for UTC or ±HH:MM for offset. Without a timezone indicator, parsers may assume local time, causing inconsistencies across systems.
  • Using Slashes or Other Separators: ISO 8601 requires hyphens for dates (YYYY-MM-DD) and colons for time (HH:MM:SS). "2024/03/15" or "2024.03.15" are not ISO 8601 compliant, though some lenient parsers accept them.
  • Confusing Week Date Format: Week dates use ISO week numbering where week 1 contains January 4th. The year in a week date (e.g., 2024-W01) may differ from the calendar year for dates near January 1st. Use week dates only when week-based calculations are explicitly needed.

Related Tools

Need numeric timestamps instead of formatted strings? Use our Unix Timestamp Converter for epoch time. For converting ISO dates between timezones, try the Timezone Converter.

Frequently Asked Questions

What does the T in ISO 8601 dates mean?

The T is a literal separator between the date and time portions. In "2024-03-15T14:30:00Z", the T separates the date (2024-03-15) from the time (14:30:00Z). It's required when combining date and time in a single string.

What does Z mean at the end of a timestamp?

Z stands for "Zulu time," the military designation for UTC. A timestamp ending in Z (e.g., "2024-03-15T14:30:00Z") is in UTC. Without Z, use an offset like +05:30 to indicate the timezone.

Why does ISO 8601 use YYYY-MM-DD instead of MM/DD/YYYY?

The YYYY-MM-DD format is unambiguous internationally (US uses MM/DD, Europe uses DD/MM) and sorts chronologically as a string. Lexicographic sorting of ISO 8601 dates produces correct chronological order without parsing—ideal for filenames and database indexing.