What this date formatter does

Turn a date into any output pattern using tokens such as yyyy, MM, dd, HH and mm, and see the result immediately. It is the fastest way to check that a format string produces what you expect before putting it in code or a report.

Prefer ISO 8601 in data

When the value is going into an API, a database or a log, use ISO 8601 (2026-10-10T14:30:00Z). It sorts correctly as text, is unambiguous about the offset, and parses identically in every language. Reserve local formats such as 10/10/2026 for display, since they are read differently on either side of the Atlantic.

Frequently asked questions

What is ISO 8601?

An international standard for writing dates and times as YYYY-MM-DDThh:mm:ss with an optional time zone offset or Z for UTC. It is unambiguous, sorts alphabetically in chronological order, and is the default for JSON APIs.

Why do my dates show the wrong month or day?

Usually because of a case error in the format tokens. In most patterns MM is the month and mm is minutes, and dd is the day while DD means something else in some languages. The preview makes this immediately visible.

Should I format in local time or UTC?

Store and transmit in UTC, and format into the users local time zone only at the point of display. Mixing the two is the most common source of dates that are off by hours.

What is the difference between a date and an instant?

An instant is a specific moment in time and needs a time zone to be meaningful. A date such as a birthday is just a calendar day and should not be converted between zones at all.

Related tools