Conversion methods turn a date into a number or a string. toISOString() and toJSON() give the UTC ISO 8601 form used by JSON.stringify(); toString(), toDateString() and toTimeString() give fixed English local formats; toLocaleString(), toLocaleDateString() and toLocaleTimeString() format through Intl.DateTimeFormat, taking a locale and options such as dateStyle and timeZone.
const d = new Date(2026, 6, 16, 9, 5); // 16 Jul 2026, 09:05 in GMT+8
console.log(d.valueOf(), d.toISOString(), JSON.stringify({ d }));
console.log(d.toUTCString(), '|', d.toDateString(), '|', d.toTimeString());
console.log(d.toLocaleString('zh-CN'), '|', d.toLocaleDateString('de-DE'));
console.log(d.toLocaleDateString('en-GB', { day: 'numeric', month: 'short', year: 'numeric' }));
console.log(d.toLocaleString('en-US', { timeZone: 'America/New_York', dateStyle: 'full',
timeStyle: 'short' }));1784163900000 2026-07-16T01:05:00.000Z {"d":"2026-07-16T01:05:00.000Z"}
Thu, 16 Jul 2026 01:05:00 GMT | Thu Jul 16 2026 | 09:05:00 GMT+0800 (Malaysia Time)
2026/7/16 09:05:00 | 16.7.2026
16 Jul 2026
Wednesday, July 15, 2026 at 9:05 PMJSON.parse() does not revive dates: pass the ISO string back to new Date(). When formatting many dates, create one Intl.DateTimeFormat and reuse its format() method rather than calling toLocaleString() in a loop.