Date Format Converter

Enter a date and a token pattern — the formatted result updates as you type. Formatting is always done in UTC, a deliberate, unambiguous choice rather than a dependency on whichever timezone happens to be running this page.

Common patterns

How it works

The date field accepts anything JavaScript's own Date parser understands — an ISO 8601 string like 2024-03-05T09:07:03Z is the safest choice, since it is the one format that means the same instant everywhere. Turning a free-form date string into a specific moment in time is genuinely ambiguous (is 03/05/2024 March 5th or May 3rd?), which is exactly why this tool's own job — the pattern step — is kept separate and unambiguous: it only ever reads UTC values off an already-resolved date.

Supported pattern tokens:

  • YYYY — 4-digit year
  • MM — 2-digit month (01–12)
  • DD — 2-digit day of month (01–31)
  • HH — 2-digit hour, 24-hour clock (00–23)
  • mm — 2-digit minute (00–59)
  • ss — 2-digit second (00–59)

Anything else in the pattern — spaces, slashes, dashes, letters that aren't a token — is left exactly as typed.