structuredClone()Baseline · Widely available
The structuredClone() global method creates a deep copy of an object. Values that cannot be cloned can instead be transferred, making the original value no longer usable.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 14, 2022. Widely available since Sep 14, 2024.
Browser support
DesktopChrome
1–97Not supported
98+Supportedsince Feb 1, 2022
Current: 155Edge
12–97Not supported
98+Supportedsince Feb 3, 2022
Current: 154Firefox
1–93Not supported
94+Supportedsince Nov 2, 2021
Current: 157Safari
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27MobileChrome Android
18–97Not supported
98+Supportedsince Feb 1, 2022
Current: 155Firefox Android
4–93Not supported
94+Supportedsince Nov 2, 2021
Current: 157Safari iOS
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
JS
const original = { date: new Date(), tags: new Set(["a"]), nested: { n: 1 } };
const copy = structuredClone(original); // deep copy, keeps Date/Set/Map
copy.nested.n = 2;
console.log(original.nested.n); // 1Feature detection
JS · check before using
if ("structuredClone" in globalThis) {
// structuredClone is available
} else {
// load a polyfill or use a fallback
}