Date.parse() is a static method that parses a date string and returns that instant as milliseconds since January 1, 1970 UTC. Invalid input returns NaN (it does not throw).
Remember
Date.parse(dateString)
→ number (epoch ms) on success
→ NaN if the string cannot be parsed
Date.parse("1970-01-01T00:00:00Z") → 0
Date.parse("not-a-date") → NaN
Date.parse(str) ≈ new Date(str).getTime()
Syntax
Call Date.parse. Start with this line.
JavaScript
Date.parse(dateString)
Call
What it does
Date.parse(dateString)
Primary signature.
Date.parse(...)
Call with the arguments your case needs.
Built into JavaScript. Call Date.parse(...) on the Date constructor — no import required.
Library declarations
JavaScript
Date.parse(dateString)
Parameters
Parameter
Description
dateString
Required. String to parse (ISO recommended)
Return Value
Return Value
Description
*
Epoch ms, or NaN
JavaScript Examples
Example 1 — MDN Epoch and Release Dates
Parse the classic Unix epoch and MDN’s JavaScript-release style string.
Choose the type. Use parse for a number; use new Date for an object.
Failed parse. Bad strings yield NaN — check with Number.isNaN.
No throw. Always validate; do not wrap in try/catch for parse failures.
Compatibility
Browser & Runtime Support
Date.parse() is part of the language from early ECMAScript and is Baseline Widely available (MDN). ISO 8601 support is required; other formats are not.
✓ Baseline · Widely available
Date.parse()
Supported in every modern browser and Node.js. Rely on ISO strings for consistent results.
99%Modern browser support
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
Date.parse()Excellent
Bottom line: The API is everywhere — portable parsing depends on using ISO 8601, not on feature detection.
Frequently Asked Questions
A number: milliseconds since January 1, 1970 UTC for the parsed string, or NaN if parsing fails. It does not throw.
Date.parse() returns epoch milliseconds. new Date(string) returns a Date object. For valid strings, Date.parse(str) equals new Date(str).getTime().
Prefer ISO 8601 such as 2026-03-15T12:00:00.000Z. Non-standard formats are implementation-defined and may differ across browsers (MDN).
Use Number.isNaN(Date.parse(input)). Failed parses return NaN—not an exception.
ISO date-only forms like 2019-01-01 are treated as UTC midnight. A date-time without a timezone (2019-01-01T00:00:00) is local time (MDN).
No. Date.now() returns the current timestamp. Date.parse() converts a date string into a timestamp.