Async Clipboard write
Puts text or images onto the clipboard.
In one line
Can put text or images on your clipboard when you tap a button
Puts text or images onto the clipboard.
Can overwrite what the person copied, for example swapping a crypto address. Allowed on a click without a prompt in all browsers.
What it can and can't do
What the user does: You tap Copy link, Copy code or a similar button
It can
- Copy text, links or images onto your clipboard after a tap or click
- Replace whatever you had copied before
- Work without any pop up in most browsers
It cannot
- Copy to your clipboard while you are not using the page, on most browsers
- See what you copied before
- Stop you from pasting something else afterward
How it differs between platforms: Chrome, Edge, Firefox and Safari all allow it after a tap. Samsung Internet support is limited.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 76 | 2019-07-30 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 127 | 2024-06-11 | None |
| Safari | Supported | 13.1 | 2020-03-24 | None |
| Safari on iPhone | Supported | 13.4 | 2020-03-24 | None |
| Chrome on Android | Supported | 76 | 2019-07-30 | None |
| Samsung Internet | Not supported | Not available | Not listed | None |
How a site asks for it
| API | navigator.clipboard.write(), writeText(); ClipboardItem.supports() |
| Permission name | clipboard-write |
| Permissions policy | clipboard-write |
| Browser compat keys | api.Clipboard.writeapi.Clipboard.writeText |
| How access is granted | gesture |
| What the user sees | No prompt; needs transient activation or (Chromium) the clipboard-write permission, which is auto-granted to the active tab. |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | Yes |
| How long it lasts | Per call |
| How to take it back | n/a |
| Inside an iframe | Cross-origin iframes need allow="clipboard-write" |
Typical flow
- Click or tap
- navigator.clipboard.writeText(...)
- Clipboard updated
Data you get
What comes back: Clipboard content
Shape: none
How often: per call
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
text/plain | string | text | any | 1 byte |
text/html | string | html | any | 1 byte |
image/png | binary | bytes | any | pixels |
web custom formats | binary | bytes | prefix 'web ' optional | per format |
Technical limits
- Needs a gesture in Firefox and Safari
- Cannot read after write without permission
The story
What it is
A site puts text or images on your clipboard, usually when you tap Copy.
For you
You press a 'Copy link' or 'Copy code' button and a small note says Copied. You can then paste it anywhere. It happens on your tap and usually shows no prompt.
For makers
Copy buttons cut friction for sharing, referral codes, invite links, and code. Makers use them to spread links and track how many people share.
Where you see it
| Type | Example | Apps |
|---|---|---|
| games | A browser game has a 'Copy invite link' button so a player can paste it to friends in chat and fill a lobby. | Skribbl.io |
| social | A share sheet button copies a post link in one tap. | X, Reddit |
| shopping | A checkout page copies a discount code so a shopper can paste it at the store. | None named |
| developer | A docs site gives a Copy button on every code block. | MDN, GitHub |
| payments | A crypto or payment page copies a wallet address, and a bad site could swap in a different one. | None named |
| analytics | A team counts how many people click Copy to measure what content gets shared. | None named |
Risks
- Can overwrite what you copied
- Clipboard hijack
What the platform says
- web.dev (Google): Async Clipboard API. Google describes it as a modern way for pages to copy text and images with a simple call after a click.
Good uses and abuse
Legitimate uses
- Copy buttons
Known abuse
- Clipboard hijacking (crypto address swap)
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 5 of 5 | How useful it is to honest apps |
| Friction | 1 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2018-04, Chrome 66: Async Clipboard write ships
- 2020-03, Safari 13.1: Async Clipboard write
Related capabilities
Related
- Async Clipboard read. Can see what you last copied, after you allow it or tap Paste
Sources
How well checked: Based on official documentation.