Date.prototype.toUTCString() returns a string for this instant in the RFC 7231 layout, always in UTC, ending with GMT (for example "Wed, 14 Jun 2017 07:00:00 GMT"). It is read-only and does not change the Date.
Remember
date.toUTCString()
→ "Wed, 14 Jun 2017 07:00:00 GMT"
→ "Invalid Date" (if invalid)
Format (always UTC):
Www, dd Mmm yyyy HH:mm:ss GMT
toISOString() → "2017-06-14T07:00:00.000Z"
toString() → local date + time
toGMTString() → same as toUTCString() (legacy alias)
Syntax
Call date.toUTCString. Start with this line.
JavaScript
date.toUTCString()
Call
What it does
date.toUTCString()
Primary signature.
date.toUTCString(...)
Call with the arguments your case needs.
Built into JavaScript. Call toUTCString(...) on a Date instance — no import required.
Library declarations
JavaScript
date.toUTCString()
Parameters
This method has no parameters beyond those shown in the signature.
Return Value
Return Value
Description
*
The value returned by date.toUTCString().
JavaScript Examples
Example 1 — Format a UTC Instant
Convert a parsed date into an RFC 7231 UTC string.
JavaScript
const event = new Date("14 Jun 2017 00:00:00 PDT");
console.log(event.toUTCString());
// "Wed, 14 Jun 2017 07:00:00 GMT"
Parse an input."14 Jun 2017 00:00:00 PDT" is midnight in Pacific Daylight Time.
Convert to UTC. PDT is UTC−7, so midnight PDT is 07:00 UTC.
Format.toUTCString() prints weekday, date, time, and GMT.
Stable timezone. Unlike toString(), the result does not depend on your local offset.
Example 2 — toUTCString() vs ISO vs Local
Same instant, three different string shapes.
JavaScript
const d = new Date(Date.UTC(2026, 2, 1, 12, 30, 45));
console.log(d.toUTCString()); // "Sun, 01 Mar 2026 12:30:45 GMT"
console.log(d.toISOString()); // "2026-03-01T12:30:45.000Z"
console.log(d.toString()); // local date + time (varies)
Create an invalid Date. Unparseable strings make getTime() return NaN.
Format anyway.toUTCString() returns the literal "Invalid Date".
No throw. Unlike toISOString(), this method does not raise RangeError.
Validate first. Check Number.isNaN(date.getTime()) if you need a custom message.
Compatibility
Browser & Runtime Support
Date.prototype.toUTCString() has been in JavaScript since ES1. It is Baseline and works in every modern browser and Node.js — no polyfill needed.
✓ Baseline · ES1
Date.prototype.toUTCString()
Supported everywhere Date exists: Chrome, Firefox, Safari, Edge, Internet Explorer, and all Node.js versions.
99%Universal API
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.toUTCString()Excellent
Bottom line: Safe to use in any environment. Prefer it over legacy toGMTString(). See also the MDN toUTCString() reference.
Frequently Asked Questions
A UTC string in the RFC 7231 form Www, dd Mmm yyyy HH:mm:ss GMT — for example "Wed, 14 Jun 2017 07:00:00 GMT". The timezone is always UTC.
Both describe the same UTC instant. toISOString() returns ISO 8601 with a Z suffix ("2017-06-14T07:00:00.000Z"). toUTCString() returns the older GMT English layout. Modern JSON APIs usually prefer ISO.
Yes. toGMTString() is a legacy alias for the same function. Prefer toUTCString() in new code — the name better matches UTC behavior.
Usually no. Prefer toISOString() or toJSON() for machine-readable JSON. toUTCString() is common for HTTP Date-style text and human-readable UTC logs.
No. It is read-only — it returns a new string and leaves the Date unchanged.
It returns the string "Invalid Date" (it does not throw). Validate with Number.isNaN(date.getTime()) if you need custom handling.