ISO Date Accessibility Formatter

Convert ISO dates into accessible <time> markup with a human-readable label

Paste an ISO 8601 date or datetime and get the correct HTML time element markup with a screen-reader-friendly text node, a localised human-readable format, and a datetime attribute that preserves full machine precision. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Why wrap dates in a <time> element?

The <time> element gives machines a precise, unambiguous datetime attribute while letting humans and screen readers read a friendly text label. Search engines and assistive tech both benefit from the dual representation.

The HTML <time> element is the accessible, machine-readable way to mark up a date or time on a web page. It pairs a precise datetime attribute (which crawlers and assistive technology can parse) with a friendly visible label that a screen reader reads aloud. This tool takes any ISO 8601 string and produces both halves correctly, so your dates are simultaneously accurate for machines and clear for people.

How it works

An ISO 8601 value such as 2026-06-06T14:30:00Z is unambiguous but hard to read. The tool parses it with the browser’s Date constructor, then:

  1. Keeps the original ISO string as the datetime attribute so parsers retain full precision.
  2. Formats a human-readable label using the Intl.DateTimeFormat API in your chosen locale and verbosity.
  3. Wraps the result as <time datetime="2026-06-06T14:30:00Z">Saturday, 6 June 2026, 14:30</time>.

Because screen readers announce the text node and ignore the datetime attribute, the visible label is what determines how the date is spoken. A bare 2026-06-06 would be read digit-by-digit; a formatted label is read naturally.

Why the <time> element matters for accessibility

Screen readers like NVDA, JAWS, and VoiceOver read whatever text is inside the element — they do not interpret the datetime attribute. So if your markup is:

<time datetime="2026-06-06">2026-06-06</time>

a screen reader announces “two thousand twenty-six hyphen zero six hyphen zero six” — an awkward listening experience. But:

<time datetime="2026-06-06">Saturday, 6 June 2026</time>

is announced naturally: “Saturday, sixth of June, twenty twenty-six.” The datetime attribute still carries the machine-readable precision for parsers; the visible text node carries the human-readable form.

Worked examples

Date-only (article publication date):

Input: 2026-06-06

<time datetime="2026-06-06">6 June 2026</time>

Full datetime with UTC offset (event start time):

Input: 2026-06-06T14:30:00+01:00

<time datetime="2026-06-06T14:30:00+01:00">
  Saturday, 6 June 2026 at 14:30 BST
</time>

Compact form for a table or timeline:

Input: 2026-06-06

<time datetime="2026-06-06">Jun 6, 2026</time>

Choosing verbosity for context

ContextRecommended visible formatRationale
Article byline or blog postLong: “Saturday, 6 June 2026”Prose reads naturally when spoken aloud
Event listingInclude time: “6 June 2026 at 14:30”Users need both date and time
Compact table or timelineShort: “6 Jun 2026” or “Jun 6”Space-constrained; context makes year clear
Relative label already visible (“yesterday”)Keep datetime precise, visible text can be relativeMachine still gets exact date

SEO and structured data benefit

Correct <time datetime="..."> markup is also read by search engines when parsing Event, Article, and Review schema. A properly formatted datetime attribute helps Google, Bing, and others extract publication dates and event times for rich results. The ISO 8601 value in datetime is the canonical input for most structured-data parsers.

Tips and edge cases

  • Always keep a valid ISO value in datetime even when the visible text is abbreviated — that is what makes the markup machine-readable.
  • For date-only values, omit the time from the label so screen readers do not announce a misleading midnight time.
  • When the user’s timezone matters, include the offset in the datetime attribute and express it in the visible label so both are consistent.
  • The datetime attribute accepts a subset of ISO 8601; it does not accept duration or interval strings, only date, time, and datetime values.