Time Tools

Date Formatter

Format dates and timestamps using common presets or custom token patterns. Live preview as you type.

Token Reference
TokenOutputExample
YYYYFull year2024
YY2-digit year24
MMMMFull month nameJanuary
MMMShort month nameJan
MMMonth (01-12)01
MMonth (1-12)1
DDDay (01-31)01
DDay (1-31)1
ddddFull weekdayMonday
dddShort weekdayMon
HHHours 24h (00-23)14
hhHours 12h (01-12)02
mmMinutes (00-59)05
ssSeconds (00-59)09
SSSMilliseconds123
AAM/PMPM
ZUTC markerZ
ZZUTC offset (±HHMM)+0000

How to use this tool

  1. Set the date and time with the Date / Time Input field, or hit Now to jump to the current moment.
  2. Type a pattern into Format Pattern using tokens like YYYY-MM-DD HH:mm:ss — the result updates live below.
  3. Click a preset tab (ISO 8601, RFC 3339, RFC 2822, Unix (s), or Unix (ms)) to fill in a standard pattern instantly.
  4. Hit Copy to copy the formatted result to your clipboard.
  5. Use the Token Reference table to look up any token and see exactly what it outputs.

Why this tool is helpful

Produce standards-compliant timestamps

One click fills in ISO 8601, RFC 3339, or RFC 2822 — the exact formats APIs, logs, and email headers expect.

Format timestamps for logs & APIs

Generate consistent, sortable timestamps for request logs, database records, and JSON payloads without hunting for the right pattern.

Generate Unix epoch timestamps

The Unix (s) and Unix (ms) presets output seconds or milliseconds since the epoch — ideal for storage and numeric comparisons.

Disambiguate date formats

Toggle between DD/MM/YYYY and MM/DD/YYYY to see which is which and avoid the classic day/month mix-up.

Learn format tokens by example

The live Token Reference table shows what every token (YYYY, MM, ss, ZZ…) renders, so you can build patterns with confidence.

Stay private

All formatting runs in your browser. Your dates and patterns are never uploaded, logged, or sent to a server.

FAQ

What does this tool do?

It formats a chosen date and time into a string using common presets (ISO 8601, RFC 3339, RFC 2822, Unix) or a custom token pattern you type yourself.

What's the difference between ISO 8601 and RFC 3339?

RFC 3339 is a stricter profile of ISO 8601. Here the ISO 8601 preset includes milliseconds (.SSS), while RFC 3339 is seconds-only. Both use a T separator and a trailing Z.

What do the Unix (s) and Unix (ms) presets output?

Unix (s) outputs seconds since the Unix epoch (January 1, 1970 UTC), and Unix (ms) outputs milliseconds. Both are plain numbers useful for storage and sorting.

Does the Z token convert my time to UTC?

No. The Z token simply appends a literal Z marker — it does not shift the time. Use ZZ to show your local UTC offset (e.g. +0000), or set the input time in UTC yourself.

Are the tokens case-sensitive?

Yes. Case matters: MM is the month, mm is minutes, HH is 24-hour time, and hh is 12-hour time.

What if I leave the Date / Time Input empty?

It falls back to the current date and time, so the preview always has a value to format.

Does any of my data leave my browser?

Never. Formatting is done entirely in local JavaScript, and nothing is sent to, stored on, or logged by a server.