Date Formatter

Format any date with day.js-style tokens like YYYY-MM-DD HH:mm:ss.

Pick a date and time and a format string with familiar tokens (YYYY, MM, DD, HH, mm, ss, dddd, MMM, A and so on). The output updates as you type. Includes a token reference for quick lookup.

Common use cases

  • Generate filenames with timestamps (YYYYMMDD-HHmmss)
  • Pretty-print dates for blog posts ("Friday, May 8, 2026")
  • Build logs or reports with consistent date formatting
  • Test format strings before wiring them into code

Frequently asked questions

Which tokens are supported?
The common day.js / moment.js tokens: YYYY, YY, MMMM, MMM, MM, M, DD, D, dddd, ddd, HH, H, hh, h, mm, ss, A, a. See the token table in the tool for examples.
How do I include literal text?
Wrap literal text in square brackets, e.g. [at] becomes "at" in the output.
Why don't I get day.js-exact behaviour?
We re-implement the most popular tokens to keep this tool zero-dependency. Edge cases (escaping, week tokens) may differ from full day.js.

Related tools