Skip to Content
Platform.Ontology

Async Clipboard write

Puts text or images onto the clipboard.

Does something on your deviceTyping and clipboardClipboardWeb browsersWhile you use it

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

BrowserStatusFirst versionReleasedNote
ChromeSupported762019-07-30None
EdgeSupported792020-01-15None
FirefoxSupported1272024-06-11None
SafariSupported13.12020-03-24None
Safari on iPhoneSupported13.42020-03-24None
Chrome on AndroidSupported762019-07-30None
Samsung InternetNot supportedNot availableNot listedNone

How a site asks for it

APInavigator.clipboard.write(), writeText(); ClipboardItem.supports()
Permission nameclipboard-write
Permissions policyclipboard-write
Browser compat keysapi.Clipboard.write
api.Clipboard.writeText
How access is grantedgesture
What the user seesNo 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 gestureYes
How long it lastsPer call
How to take it backn/a
Inside an iframeCross-origin iframes need allow="clipboard-write"

Typical flow

  1. Click or tap
  2. navigator.clipboard.writeText(...)
  3. Clipboard updated

Data you get

What comes back: Clipboard content
Shape: none
How often: per call

FieldTypeUnitRangePrecision
text/plainstringtextany1 byte
text/htmlstringhtmlany1 byte
image/pngbinarybytesanypixels
web custom formatsbinarybytesprefix 'web ' optionalper 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

TypeExampleApps
gamesA browser game has a 'Copy invite link' button so a player can paste it to friends in chat and fill a lobby.Skribbl.io
socialA share sheet button copies a post link in one tap.X, Reddit
shoppingA checkout page copies a discount code so a shopper can paste it at the store.None named
developerA docs site gives a Copy button on every code block.MDN, GitHub
paymentsA crypto or payment page copies a wallet address, and a bad site could swap in a different one.None named
analyticsA 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

Good uses and abuse

Legitimate uses

  • Copy buttons

Known abuse

  • Clipboard hijacking (crypto address swap)

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility5 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2018-04, Chrome 66: Async Clipboard write ships
  • 2020-03, Safari 13.1: Async Clipboard write

Sources

How well checked: Based on official documentation.

On this page