csvkit.org
CSV (Comma-Separated Values) utilities, in the browser
Say hi →

Change the Date Format in a CSV

detects the date columns · 10 output patterns · epoch and Excel serials · counts the ambiguous values

Dates are the field most likely to be quietly wrong in a CSV, because 03/04/2026 is a valid date under two readings that are a month apart and nothing in the file says which one was meant. This reformats a date column into whatever shape you need — and rather than picking a reading and saying nothing, it counts the values that were genuinely ambiguous so you know whether you have to go and check.

columns
in
out
unparseable
Or drop a .csv file here, or
ready

How to reformat a date column

  1. Paste the CSV or drop a file. Any column where most values parse as a date is ticked automatically — untick anything you don't want touched.
  2. If the input uses slashes, set the order explicitly. auto-detect is right most of the time, but see the ambiguity note below.
  3. Pick the output shape, or choose custom pattern and write your own with the tokens listed below.
  4. Read the status line. It tells you how many values were reformatted, how many were ambiguous, and shows examples of anything that would not parse.

The DD/MM vs MM/DD problem

03/04/2026 is 3 April in most of the world and 4 March in the United States. Both readings are valid, so no amount of cleverness can tell them apart from the value alone. What a tool can do is notice.

On auto-detect, if only one reading gives a real date — 25/12/2026 has no 25th month — that reading is used and there is nothing to report. When both numbers are 12 or lower, the value is genuinely ambiguous: day/month is used, and the count is shown in the status line. If that count is above zero, do not ship the file until you know which convention the source system used. Set the order explicitly and the count disappears, because you have made the decision rather than the tool.

A file can also be mixed, which is worse: an export that formats dates with the OS locale produces 13/01/2026 and 01/13/2026 in the same column. Both parse, one per reading, and the result is silently 12 days of nonsense. The ambiguity count is how you catch it.

What it can read

Custom pattern tokens

FAQ

Does it convert time zones?

No — and that is deliberate. An offset in the input is preserved and can be emitted with the Z token, but the date and clock time are never shifted. Silently moving a date across midnight because of a time zone is exactly the kind of change that is impossible to spot in a spreadsheet later.

What happens to blank cells?

They stay blank and are not counted as failures. Only a non-empty value that cannot be parsed counts as unparseable, and the status line shows up to three examples so you can see what shape they are.

Why would I add an _iso column instead of converting in place?

To keep the original for auditing. You get the source column untouched plus a machine-sortable YYYY-MM-DD copy next to it — useful when you are handing the file to someone who will want to check your work, and necessary when the original strings are themselves the record.

Will ISO output sort correctly as text?

Yes, that is the point of it. YYYY-MM-DD is the only common format whose lexical order matches chronological order, which is why sorting, grouping and SQL over CSV all behave predictably with it and unpredictably with DD/MM/YYYY.

Is anything uploaded?

No. Parsing and formatting both run in your browser.

Privacy

100% client-side. No upload. See the privacy policy.