Date format converter
Convert a date from one format to another. Paste it as you have it, such as 22/10/2026 10:23, Oct 22, 2026 3:45 PM or Thu, 22 Oct 2026 03:23:34 GMT, and write it in another: ISO 8601, SQL, day or month first, or a pattern of your own such as DD/MM/YYYY. The same format is shown as Python, Go, Java, C#, PHP, JavaScript and SQL write it.
Dates it reads
- ISO 8601 and SQL: 2026-10-22, 2026-10-22 10:23:34, 2026-10-22T10:23:34.250+07:00
- Day or month first, with /, . or -: 22/10/2026, 10/22/2026, 22.10.2026, 22-10-26
- Month names: 22 Oct 2026, October 22, 2026, 22-Oct-2026, Oct 22nd 2026
- 12- and 24-hour times: 3:45 PM, 15:45, 15:45:30.250
- What programs write: email and HTTP dates (Thu, 22 Oct 2026 03:23:34 GMT), JavaScript's Date (Thu Oct 22 2026 10:23:34 GMT+0700), C's asctime and the Unix date command
- Time zones: Z, UTC or GMT, an offset such as +07:00 or GMT+7, EST and the other US zones, or a name such as Asia/Jakarta
- Unix timestamps in seconds, milliseconds, microseconds or nanoseconds
A date without a time zone is read as your local time. A date that cannot be, such as 30 February, is turned down with the reason.
Day or month first?
In 01/02/2026 either number could be the month. A number over 12 settles it: 22/10/2026 can only be day first. Otherwise the converter reads it as your browser's language writes dates, month first in the United States and day first almost everywhere else, and shows both readings to pick from; your pick is kept for next time. Two-digit years are read as strptime reads them: 69 to 99 are 1969 to 1999, 00 to 68 are 2000 to 2068.
Formats to start from
- SQL date and time: YYYY-MM-DD HH:mm:ss
- ISO 8601 with offset: YYYY-MM-DDTHH:mm:ssZ
- ISO 8601 with milliseconds: YYYY-MM-DDTHH:mm:ss.SSSZ
- Date, year first: YYYY-MM-DD
- Day first: DD/MM/YYYY
- Month first (US): MM/DD/YYYY
- Day first with dots: DD.MM.YYYY HH:mm
- Day, short month: D MMM YYYY
- Month name first: MMMM D, YYYY
- Email and HTTP (RFC 2822): ddd, DD MMM YYYY HH:mm:ss ZZ
- 12-hour time: h:mm A
- For file names: YYYYMMDD-HHmmss
Pattern letters
Patterns use the letters of Day.js and Moment. Text in [brackets] is kept as it is, so [at] stays at.
- YYYY: 2026
- YY: 26
- MMMM: October
- MMM: Oct
- MM: 10
- M: 10, 9
- DD: 05
- D: 5
- dddd: Thursday
- ddd: Thu
- HH: 24-hour
- hh: 12-hour
- mm: minutes
- ss: seconds
- SSS: milliseconds
- A: PM
- a: pm
- Z: +07:00
- ZZ: +0700
- X: Unix seconds
- x: milliseconds
The same format in code
- Python: strftime codes (%d/%m/%Y). Without a leading zero, %-d works on Linux and macOS and %#d on Windows; milliseconds are %f cut to three digits.
- Go: a layout written as one moment, Mon Jan 2 15:04:05 MST 2006 (02/01/2006), so digits and words such as Jan in its text become parts of the date.
- Java and Kotlin: DateTimeFormatter patterns (dd/MM/yyyy), text in single quotes, with Locale.ENGLISH for English month and day names.
- C#: custom format strings (dd/MM/yyyy) with CultureInfo.InvariantCulture, as otherwise / and : become the culture's own separators.
- PHP: date() letters (d/m/Y), with a backslash before a letter meant as text.
- JavaScript: date-fns (dd/MM/yyyy), or Day.js and Moment (DD/MM/YYYY). The browser's own Intl.DateTimeFormat has no patterns.
- PostgreSQL: to_char (DD/MM/YYYY HH24:MI), with FM to drop leading zeros and the padding after names.
- MySQL: DATE_FORMAT (%d/%m/%Y %H:%i). It has no time zones to write, and no milliseconds.
Questions
How do I convert dd/mm/yyyy to yyyy-mm-dd?
Paste the date and pick "Date, year first": 22/10/2026 becomes 2026-10-22. In code, read it with one format and write it with the other, as in Python: datetime.strptime(s, "%d/%m/%Y").strftime("%Y-%m-%d").
Why does Go write dates as 2006-01-02?
A Go layout is an example of one moment, Mon Jan 2 15:04:05 MST 2006, whose parts count up in American order: month 1, day 2, hour 3 (15), minute 4, second 5, year 6 and zone -7. So 02/01/2006 means day, month and year.
Why does my date come out a day off?
Usually a time zone: a date written without one is read as local time on one side and as UTC on the other. Pick the time zone to write it in, or give it one, such as 2026-10-22T00:00:00Z.
Is my date sent anywhere?
No. It is read and written in your browser, with its own time zone data, and nothing is saved.
More tools
- Timestamp, Cron, Regex & UUID Utilities
- Unix Timestamp Converter – Epoch to Date
- Cron Expression Explainer & Next Run Times
- Regex Tester for JavaScript Regular Expressions
- UUID / GUID Generator & Decoder (v4, v7)
- Free Online Diagram Maker & Editor
- Formatter & Converter for JSON, YAML, XML, SQL
- Crypto Tools: Passwords, Keys, Hashes & JWTs