Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Use structuredClone(value) to make a deep copy of supported JavaScript data. Use JSON.stringify(value) when you need JSON text for storage or exchange. The common JSON.parse(JSON.stringify(value)) trick is not a general-purpose clone: it can change or omit values and fails on circular references.
Choose by what you need the result to do
| Your goal or data | Better fit | Reason |
|---|---|---|
| Deep-copy supported in-memory data, including circular references | structuredClone() |
It handles cycles and returns a deep copy of supported values. MDN explains the structured clone algorithm. |
Keep values such as Date, Map, or Set |
structuredClone() |
These types are supported by the algorithm. MDN lists supported values. |
| Produce text in JSON format for storage or exchange | JSON.stringify() |
It converts a JavaScript value to JSON text; that text is the useful output. MDN documents JSON.stringify(). |
| Clone data containing functions, DOM nodes, or custom object behavior that must remain intact | Neither as a faithful, general-purpose clone | Structured cloning rejects some values and does not preserve some object semantics; JSON omits or converts certain values. |
| Hand off supported transferable data rather than keep a usable original | structuredClone(value, { transfer }) |
Transfer changes ownership behavior: transferred objects are no longer usable through the original reference. The HTML Standard describes transfer semantics. |
| Run in a specific older browser, embedded web view, or runtime | Check that environment first | Support in current major browsers does not guarantee support in every deployment target. |
What structuredClone() copies—and what it does not
structuredClone(value) uses the structured clone algorithm to serialize and deserialize supported JavaScript and platform data. It is designed to make a deep copy, rather than produce a JSON representation. It can handle circular references and common built-in types including Date, Map, Set, ArrayBuffer, and typed arrays. The HTML Standard defines the algorithm and API; MDN documents supported values and limitations.
As an Amazon Associate I earn from qualifying purchases.
Cycles work
The algorithm tracks references it has already visited. That lets it preserve a circular relationship in the copied object graph instead of failing when it encounters a reference back to an earlier object.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteUnsupported values and lost semantics
- Functions and DOM nodes cannot be cloned; attempting to clone them causes a
DataCloneError. - Custom prototypes are not copied, so a cloned object is not guaranteed to retain the original object’s class or custom behavior.
- Property descriptors, getters, and setters are not preserved as such.
- A regular expression’s
lastIndexis not preserved.
So “deep clone” does not mean “recreate every detail of every JavaScript object.” If your code depends on custom methods, property accessors, or other object metadata, structured cloning may not be a drop-in replacement.
#1 Best Overall
Transfer is a handoff, not an ordinary copy
The optional transfer setting transfers supported transferable objects instead of leaving the source object usable alongside a copy. After transfer, the original transferred object is no longer usable. Use it when that ownership change is intentional, not as a performance tweak to an otherwise ordinary clone. The HTML Standard describes the transfer behavior.
What JSON.stringify() does to JavaScript values
JSON.stringify(value) produces JSON text. That makes it appropriate when text in JSON format is what you want to store or exchange. It does not, by itself, return a deep copy of the original JavaScript value. MDN documents its conversion behavior.
Rank #2
Why stringify-then-parse is lossy
JSON.parse(JSON.stringify(value)) serializes the value and then parses the resulting text into a new value. The round trip can keep only what the JSON conversion represents:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- Object properties whose values are
undefined, functions, or symbols are omitted. - Those values in arrays become
null. - Serializing a
BigIntthrows unless custom serialization behavior is supplied. - Circular references cause a
TypeError, because JSON does not represent object-reference cycles.
These behaviors are documented in MDN’s JSON.stringify() reference. A successful round trip therefore does not prove that the original value was faithfully cloned.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Check support in your target environment
The current WHATWG HTML Standard index search result lists Chrome 98+, Firefox 94+, Safari 15.4+, and Edge 98+ for structuredClone(). Treat these as reference thresholds, not a guarantee for every browser version, embedded web view, or JavaScript runtime. Confirm support in the actual environments your application targets.
Quick Recap
Best Value
Rank #4
A practical decision rule
- Need JSON text? Use
JSON.stringify()and account for how its conversion handles your values. - Need a deep copy of supported in-memory data? Use
structuredClone(value), after checking that the data and required object semantics are supported. - Need a faithful copy of functions, DOM nodes, custom prototypes, or descriptors? Neither API is a universal solution; choose an approach designed around those specific requirements.
- Need to transfer ownership? Use the transfer option only when the original transferred object becoming unusable is intended.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




