Date Formatter and Parser
Format any date with Moment.js, strftime or Unicode LDML patterns, see ISO 8601, RFC 2822, HTTP and Unix formats, and parse custom date strings.
Accepts ISO 8601 (2026-03-10T14:30:00+07:00), RFC 2822, Unix seconds or milliseconds, and most common date strings.
Used for input without an offset and for every output below.
Moment tokens for unusual input, e.g. DD/MM/YYYY HH:mm. Month names must be in English.
What is Date Formatter?
Reads a date in almost any common notation (ISO 8601, RFC 2822, Unix seconds or milliseconds, or a custom pattern) and outputs it in a custom pattern plus a set of standard formats, all in the time zone you choose.
How to use Date Formatter
- Enter a date in Date / time to format or click Now; the line below tells you how it was read.
- Choose the Time zone used for input without an offset and for all outputs.
- If the input has an unusual layout, describe it in Input pattern, e.g. DD/MM/YYYY HH:mm.
- Type an Output pattern, choose the Token syntax (Moment.js, strftime or LDML) and the language for month and weekday names.
- Copy the formatted result or any of the standard formats in the table.
Example
2026-03-10T07:30:05Z, zone Asia/Ho_Chi_Minh, pattern YYYY-MM-DD HH:mm:ss
2026-03-10 14:30:05 – ISO 8601: 2026-03-10T14:30:05+07:00 – RFC 2822: Tue, 10 Mar 2026 14:30:05 +0700 – Unix: 1773127805
When to use Date Formatter
Use it to build or test format strings for code, convert dates between APIs, or understand an unfamiliar timestamp. It does not support every exotic token of every library; check the token reference in the tool for the supported set.
How Date Formatter works
Input is parsed by explicit rules: digit-only values are Unix timestamps (up to 11 digits seconds, 12–14 milliseconds), then ISO 8601/RFC 3339, then RFC 2822, then the browser's own parser. Values without an offset are placed in the selected zone, with daylight saving gaps and overlaps handled. Formatting replaces tokens such as YYYY, %Y or yyyy with fields taken from Intl.DateTimeFormat in that zone; month and weekday names come from Intl in the chosen language.
Common Use Cases
- Writing a strftime or Moment format string and checking its output
- Converting an ISO timestamp to an RFC 2822 email date
- Reading a Unix timestamp from a log in a specific time zone
- Parsing a day-first date like 10/03/2026 into ISO 8601
FAQs
What is the difference between Moment, strftime and LDML tokens?
They are three common notations for the same idea: Moment/Day.js uses YYYY-MM-DD, strftime (C, Python, PHP, Ruby) uses %Y-%m-%d, and Unicode LDML (date-fns, Java, Swift) uses yyyy-MM-dd. Note that in LDML lowercase dd is the day and uppercase DD is the day of year.
How is a date without a time zone interpreted?
In the time zone selected in the tool. Dates with Z or an offset like +07:00 are exact and only displayed in the selected zone.
How does the tool tell seconds from milliseconds?
By length: up to 11 digits are seconds, 12–14 digits are milliseconds and 15–17 digits are microseconds.
Why are the month names not in English?
Names follow the page language by default. Switch Month and weekday names to English for the C/POSIX-style output most code expects.