Clipboard

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2020.

* Some parts of this feature may have varying levels of support.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The Clipboard interface of the Clipboard API provides read and write access to the contents of the system clipboard. This allows a web application to implement cut, copy, and paste features.

EventTarget Clipboard

The system clipboard is exposed through the global Navigator.clipboard property.

All of the Clipboard API methods operate asynchronously; they return a Promise which is resolved once the clipboard access has been completed. The promise is rejected if clipboard access is denied.

All the methods require a secure context. Additional requirements for using the API are discussed in the Security consideration section of the API overview topic.

Instance methods

Clipboard is based on the EventTarget interface, and includes its methods.

read()

Requests arbitrary data (such as images) from the clipboard, returning a Promise that resolves with an array of ClipboardItem objects containing the clipboard's contents.

readText()

Requests text from the system clipboard, returning a Promise that is fulfilled with a string containing the clipboard's text once it's available.

write()

Writes arbitrary data to the system clipboard, returning a Promise that resolves when the operation completes.

writeText()

Writes text to the system clipboard, returning a Promise that is resolved once the text is fully copied into the clipboard.

Events

clipboardchange

Fired when the system clipboard contents are changed in any way, for example via a system copy command, or via an API method such as Clipboard.writeText().

Specifications

Specification
Clipboard API and events
# clipboard-interface

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Clipboard
Chrome – Full support
Chrome 66 (Release date: 2018-04-17)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 63 (Release date: 2018-10-23)
footnote Full support
Opera – Full support
Opera 53 (Release date: 2018-05-10)
footnote Full support
Safari – Full support
Safari 13.1 (Release date: 2020-03-24)
footnote Full support
Chrome Android – Full support
Chrome Android 66 (Release date: 2018-04-17)
footnote Full support
Firefox for Android – Full support
Firefox for Android 63 (Release date: 2018-10-23)
footnote Full support
Opera Android – Full support
Opera Android 47 (Release date: 2018-07-23)
footnote Full support
Safari on iOS – Full support
Safari on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Samsung Internet – Full support
Samsung Internet 9 (Release date: 2018-09-15)
footnote Full support
WebView Android – Full support
WebView Android 66 (Release date: 2018-04-17)
footnote Full support
WebView on iOS – Full support
WebView on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
clipboardchange event
Experimental
Chrome – Full support
Chrome 144 (Release date: 2026-01-13)
footnote
footnote From version 145, firing clipboardchange events requires sticky activation or the clipboard-read permission to be granted.
Edge – Full support
Edge 144 (Release date: 2026-01-21)
footnote
footnote From version 145, firing clipboardchange events requires sticky activation or the clipboard-read permission to be granted.
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 128 (Release date: 2026-02-26)
footnote
footnote From version 129, firing clipboardchange events requires sticky activation or the clipboard-read permission to be granted.
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 144 (Release date: 2026-01-13)
footnote
footnote From version 145, firing clipboardchange events requires sticky activation or the clipboard-read permission to be granted.
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 95 (Release date: 2026-02-11)
footnote
footnote From version 96, firing clipboardchange events requires sticky activation or the clipboard-read permission to be granted.
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
read
Chrome – Full support
Chrome 76 (Release date: 2019-07-30)
footnote
footnote The user must grant the clipboard-read permission.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote The user must grant the clipboard-read permission.
Firefox – Full support
Firefox 127 (Release date: 2024-06-11)
footnote
footnote This method must be called within user gesture event handlers.
footnote A paste prompt is displayed when the clipboard is read. If the clipboard contains same-origin content, the prompt is suppressed.
footnote Web extensions with the clipboardRead permission in their manifest can read data without the paste prompt displaying. Prior to Firefox 147, extensions without this permission were unable to read clipboard data.
Opera – Full support
Opera 63 (Release date: 2019-08-20)
footnote
footnote The user must grant the clipboard-read permission.
Safari – Full support
Safari 13.1 (Release date: 2020-03-24)
footnote Full support
Chrome Android – Full support
Chrome Android 76 (Release date: 2019-07-30)
footnote
footnote The user must grant the clipboard-read permission.
Firefox for Android – Full support
Firefox for Android 127 (Release date: 2024-06-11)
footnote
footnote This method must be called within user gesture event handlers.
footnote A paste prompt is displayed when the clipboard is read. If the clipboard contains same-origin content, the prompt is suppressed.
footnote Web extensions with the clipboardRead permission in their manifest can read data without the paste prompt displaying. Prior to Firefox for Android 147, extensions without this permission were unable to read clipboard data.
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote
footnote The user must grant the clipboard-read permission.
Safari on iOS – Full support
Safari on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote
footnote The user must grant the clipboard-read permission.
WebView Android – Full support
WebView Android 76 (Release date: 2019-07-30)
footnote
footnote The user must grant the clipboard-read permission.
WebView on iOS – Full support
WebView on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
formats.unsanitized parameter
Experimental
Chrome – Full support
Chrome 122 (Release date: 2024-02-20)
footnote Full support
Edge – Full support
Edge 122 (Release date: 2024-02-23)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 108 (Release date: 2024-03-05)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 122 (Release date: 2024-02-20)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 81 (Release date: 2024-03-14)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 26 (Release date: 2024-06-07)
footnote Full support
WebView Android – Full support
WebView Android 122 (Release date: 2024-02-20)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
readText
Chrome – Full support
Chrome 66 (Release date: 2018-04-17)
footnote
footnote The user must grant the clipboard-read permission.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote The user must grant the clipboard-read permission.
Firefox – Full support
Firefox 125 (Release date: 2024-04-16)
footnote
footnote This method must be called within user gesture event handlers.
footnote A paste prompt is displayed when the clipboard is read. If the clipboard contains same-origin content, the prompt is suppressed.
footnote Web extensions with the clipboardRead permission in their manifest can read data without the paste prompt displaying. Prior to Firefox 147, extensions without this permission were unable to read clipboard data.
Opera – Full support
Opera 53 (Release date: 2018-05-10)
footnote
footnote The user must grant the clipboard-read permission.
Safari – Full support
Safari 13.1 (Release date: 2020-03-24)
footnote Full support
Chrome Android – Full support
Chrome Android 66 (Release date: 2018-04-17)
footnote
footnote The user must grant the clipboard-read permission.
Firefox for Android – Full support
Firefox for Android 125 (Release date: 2024-04-16)
footnote
footnote This method must be called within user gesture event handlers.
footnote A paste prompt is displayed when the clipboard is read. If the clipboard contains same-origin content, the prompt is suppressed.
footnote Web extensions with the clipboardRead permission in their manifest can read data without the paste prompt displaying. Prior to Firefox for Android 147, extensions without this permission were unable to read clipboard data.
Opera Android – Full support
Opera Android 47 (Release date: 2018-07-23)
footnote
footnote The user must grant the clipboard-read permission.
Safari on iOS – Full support
Safari on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Samsung Internet – Full support
Samsung Internet 9 (Release date: 2018-09-15)
footnote
footnote The user must grant the clipboard-read permission.
WebView Android – Full support
WebView Android 66 (Release date: 2018-04-17)
footnote
footnote The user must grant the clipboard-read permission.
WebView on iOS – Full support
WebView on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Supports image/png MIME type
Chrome – Full support
Chrome 76 (Release date: 2019-07-30)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 127 (Release date: 2024-06-11)
footnote Full support
Opera – Full support
Opera 63 (Release date: 2019-08-20)
footnote Full support
Safari – Full support
Safari 13.1 (Release date: 2020-03-24)
footnote Full support
Chrome Android – Full support
Chrome Android 76 (Release date: 2019-07-30)
footnote Full support
Firefox for Android – Full support
Firefox for Android 127 (Release date: 2024-06-11)
footnote Full support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 76 (Release date: 2019-07-30)
footnote Full support
WebView on iOS – Full support
WebView on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Supports text/html MIME type
Chrome – Full support
Chrome 86 (Release date: 2020-10-20)
footnote Full support
Edge – Full support
Edge 86 (Release date: 2020-10-09)
footnote Full support
Firefox – Full support
Firefox 127 (Release date: 2024-06-11)
footnote Full support
Opera – Full support
Opera 72 (Release date: 2020-10-21)
footnote Full support
Safari – Full support
Safari 13.1 (Release date: 2020-03-24)
footnote Full support
Chrome Android – Full support
Chrome Android 86 (Release date: 2020-10-20)
footnote Full support
Firefox for Android – Full support
Firefox for Android 127 (Release date: 2024-06-11)
footnote Full support
Opera Android – Full support
Opera Android 61 (Release date: 2020-12-07)
footnote Full support
Safari on iOS – Full support
Safari on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Samsung Internet – Full support
Samsung Internet 14 (Release date: 2021-04-17)
footnote Full support
WebView Android – Full support
WebView Android 86 (Release date: 2020-10-20)
footnote Full support
WebView on iOS – Full support
WebView on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Supports text/plain MIME type
Chrome – Full support
Chrome 76 (Release date: 2019-07-30)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 127 (Release date: 2024-06-11)
footnote Full support
Opera – Full support
Opera 63 (Release date: 2019-08-20)
footnote Full support
Safari – Full support
Safari 13.1 (Release date: 2020-03-24)
footnote Full support
Chrome Android – Full support
Chrome Android 76 (Release date: 2019-07-30)
footnote Full support
Firefox for Android – Full support
Firefox for Android 127 (Release date: 2024-06-11)
footnote Full support
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote Full support
Safari on iOS – Full support
Safari on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 76 (Release date: 2019-07-30)
footnote Full support
WebView on iOS – Full support
WebView on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
write
Chrome – Full support
Chrome 76 (Release date: 2019-07-30)
footnote
footnote From version 107, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 107, the user must grant the clipboard-write permission.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 127 (Release date: 2024-06-11)
footnote
footnote This method must be called within user gesture event handlers.
footnote Web extensions with the clipboardWrite permission in their manifest can write data without a user gesture.
Opera – Full support
Opera 63 (Release date: 2019-08-20)
footnote
footnote From version 93, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 93, the user must grant the clipboard-write permission.
Safari – Full support
Safari 13.1 (Release date: 2020-03-24)
footnote Full support
Chrome Android – Full support
Chrome Android 76 (Release date: 2019-07-30)
footnote
footnote From version 107, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 107, the user must grant the clipboard-write permission.
Firefox for Android – Full support
Firefox for Android 127 (Release date: 2024-06-11)
footnote
footnote This method must be called within user gesture event handlers.
footnote Web extensions with the clipboardWrite permission in their manifest can write data without a user gesture.
Opera Android – Full support
Opera Android 54 (Release date: 2019-10-18)
footnote
footnote From version 73, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 73, the user must grant the clipboard-write permission.
Safari on iOS – Full support
Safari on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote
footnote From version 21.0, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 21.0, the user must grant the clipboard-write permission.
WebView Android – Full support
WebView Android 76 (Release date: 2019-07-30)
footnote
footnote From version 107, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 107, the user must grant the clipboard-write permission.
WebView on iOS – Full support
WebView on iOS 13.4 (Release date: 2020-03-24)
footnote Full support
writeText
Chrome – Full support
Chrome 66 (Release date: 2018-04-17)
footnote
footnote From version 107, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 107, the user must grant the clipboard-write permission.
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote
footnote From version 107, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 107, the user must grant the clipboard-write permission.
Firefox – Full support
Firefox 63 (Release date: 2018-10-23)
footnote
footnote This method must be called within user gesture event handlers.
footnote Web extensions with the clipboardWrite permission in their manifest can write data without a user gesture.
Opera – Full support
Opera 53 (Release date: 2018-05-10)
footnote
footnote From version 93, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 93, the user must grant the clipboard-write permission.
Safari – Full support
Safari 13.1 (Release date: 2020-03-24)
footnote
footnote This method must be called within user gesture event handlers.
Chrome Android – Full support
Chrome Android 66 (Release date: 2018-04-17)
footnote
footnote From version 107, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 107, the user must grant the clipboard-write permission.
Firefox for Android – Full support
Firefox for Android 63 (Release date: 2018-10-23)
footnote
footnote This method must be called within user gesture event handlers.
footnote Web extensions with the clipboardWrite permission in their manifest can write data without a user gesture.
Opera Android – Full support
Opera Android 47 (Release date: 2018-07-23)
footnote
footnote From version 73, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 73, the user must grant the clipboard-write permission.
Safari on iOS – Full support
Safari on iOS 13.4 (Release date: 2020-03-24)
footnote
footnote This method must be called within user gesture event handlers.
Samsung Internet – Full support
Samsung Internet 9 (Release date: 2018-09-15)
footnote
footnote From version 21.0, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 21.0, the user must grant the clipboard-write permission.
WebView Android – Full support
WebView Android 66 (Release date: 2018-04-17)
footnote
footnote From version 107, this method must be called within user gesture event handlers, or the user must grant the clipboard-write permission.
footnote Before version 107, the user must grant the clipboard-write permission.
WebView on iOS – Full support
WebView on iOS 13.4 (Release date: 2020-03-24)
footnote
footnote This method must be called within user gesture event handlers.

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.

See also