General coerce.String(42) safely turns many values into text.
Number’s own method.(42).toString() is Number.prototype.toString, not String’s.
Templates work too.`${true}` coerces with default rules.
Wrong this throws. Forcing String’s toString onto a number → TypeError.
Compatibility
Browser & Runtime Support
String.prototype.toString() is Baseline Widely available — supported in every modern browser and legacy environments for decades.
✓ Baseline · Widely available
String.prototype.toString()
Supported in all evergreen browsers, Internet Explorer, and every current Node.js / Deno / Bun release.
100%Universal support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 4+ · Legacy environments
Full support
OperaAll 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
String.toString()Universal
Bottom line: Safe everywhere. Use it to unwrap String objects or document an explicit string result; use String(x) when you need to coerce non-string values.
Frequently Asked Questions
String.prototype.toString() returns the string primitive — for a literal that is the string itself; for a String object it unwraps the text inside. It takes no arguments.
For String they behave the same: both return the underlying string text. Beginners often meet toString() first; either is fine for unwrapping a String object.
Rarely for string primitives — they are already strings. It is useful when you have a String object from new String(...) and want a primitive, or when documenting an explicit conversion.
Calling String.prototype.toString with a non-string this (for example via call/apply on a number) throws TypeError. It does not coerce other types to string.
No. Number.toString() can take a radix (base 2–36). String.toString() has no radix — it only returns the string value.
No. It returns a string primitive. The original literal or String object is not mutated.