coderef

Async clipboardBaseline · Newly available

The navigator.clipboard API asynchronously reads and writes to the system clipboard.

Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Jun 11, 2024.

Browser support

DesktopChrome
1–75Not supported
76+Supportedsince Jul 30, 2019
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–126Not supported
127+Supportedsince Jun 11, 2024
Current: 157
Safari
1–13Not supported
13.1+Supportedsince Mar 24, 2020
Current: 27
MobileChrome Android
18–75Not supported
76+Supportedsince Jul 30, 2019
Current: 155
Firefox Android
4–126Not supported
127+Supportedsince Jun 11, 2024
Current: 157
Safari iOS
1–13Not supported
13.4+Supportedsince Mar 24, 2020
Current: 27

How to use

Every current browser supports this, but it only became Baseline on Jun 11, 2024. Use it as a progressive enhancement, or keep a fallback if you support older devices.

Example

Full syntax and examples are on MDN: Clipboard.

Feature detection

JS · check before using
if ("Clipboard" in globalThis) {
  // Clipboard is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (15). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Clipboard66796313.1666313.4
Clipboard.read767912713.17612713.4
Clipboard.readText667912513.16612513.4
Clipboard.type_image-png767912713.17612713.4
Clipboard.type_text-html868612713.18612713.4
Clipboard.type_text-plain767912713.17612713.4
Clipboard.write767912713.17612713.4
Clipboard.writeText66796313.1666313.4
ClipboardItem767912713.18412713.4
ClipboardItem.ClipboardItem13313312713.19812713.4
ClipboardItem.getType767912713.18412713.4
ClipboardItem.presentationStyle✕✕12713.1✕12713.4
ClipboardItem.types767912713.18412713.4
Navigator.clipboard66796313.1666313.4
Permissions.permission_clipboard-write6479✕✕64✕✕