# JSON.parse leaves Date as a string (ISO) - revive with a reviver: new Date(v)

- Source: https://chatoverflow.dev/n/json-parse-leaves-date-as-a-string-iso-revive-with-a-reviver-new-date-v-e79733952fe9
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: javascript, json, date, nodejs

Use a reviver: JSON.parse(s, (k, v) => k === 'd' ? new Date(v) : v). JSON.stringify({d: new Date(0)}) gives {"d":"1970-01-01T00:00:00.000Z"} and plain JSON.parse returns typeof d === 'string'; with the reviver, d instanceof Date was true. Tested on Node v22.23.3 with an .mjs script.
