Paste event (read what the person pastes)
Gives the page the clipboard contents, but only when the person presses paste inside the page.
In one line
Can get what you paste, but only when you press paste on its page
Gives the page the clipboard contents, but only when the person presses paste inside the page.
A paste is consent for that one read: the site gets text, HTML or files the person chose to paste. It cannot peek at the clipboard at other times, which blocks silent snooping.
What it can and can't do
What the user does: You press Ctrl+V, Cmd+V, or use Paste from the menu on the page
It can
- Receive text, HTML or files that you paste
- Fill in a form field or an editor with it
- Work without any pop up
It cannot
- See your clipboard when you did not paste
- See what you pasted on other pages or apps
- Get more than the one paste you did
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 22 | 2013-06-25 | None |
| Safari | Supported | 3 | 2007-10-26 | None |
| Safari on iPhone | Supported | 3 | 2009-06-17 | All iOS browsers use WebKit |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | document.addEventListener('paste', e => e.clipboardData.getData('text/plain')) |
| Browser compat keys | api.Element.paste_eventapi.ClipboardEvent.clipboardData |
| How access is granted | gesture |
| What the user sees | No prompt (needs a click, tap or keypress) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | Per paste action |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Fires in the focused frame only |
Typical flow
- Person presses Ctrl or Cmd+V (or the context menu Paste)
- paste event fires
- Page reads clipboardData: text, html, files
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- Only fires on a user paste in the focused document; scripts cannot trigger it with dispatchEvent for real data
- Types readable: text/plain, text/html, text/uri-list and files (images, documents)
- Pasted HTML is the browser sanitized form, not raw source from the source app
- No permission prompt (the keystroke is the consent)
- Pasted files expose name, size, type, lastModified; no path
The story
What it is
The page gets what you paste, but only when you press paste on it.
For you
You paste into a page with Ctrl+V or a right click and the content appears. Pasting counts as your yes for that one time. The page cannot peek at your clipboard at other times.
For makers
Makers let people paste screenshots, tables and links into editors, chats and forms. They can also clean up pasted content or paste formatted text and images safely.
Where you see it
| Type | Example | Apps |
|---|---|---|
| messaging | A chat app lets you paste a screenshot from your clipboard right into the message box. | Slack, Discord, WhatsApp Web |
| productivity | A document editor pastes a copied web table and keeps its columns. | Google Docs, Notion |
| creative | A design tool turns a pasted image or SVG into a layer on the canvas. | Figma, Canva |
| games | A level editor or modding site lets you paste a map code into a box and loads it. | None named |
| security | A site may block pasting into password or code fields, which annoys people with password managers. | None named |
| analytics | A form tool records whether you pasted an email or typed it, as one more signal about bots. | None named |
Risks
- Pasted private data is readable
- Hidden formatting
What the platform says
- MDN (standards docs): Clipboard events. Describes the paste event that gives pages the clipboard content when the person pastes into them.
Good uses and abuse
Legitimate uses
- Paste images into chat or docs
- Smart paste cleaning
- Paste from spreadsheets
Known abuse
- Capturing a sensitive clipboard after social engineering to press paste
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 5 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2012, Chrome 1: paste event with clipboardData files for images
- 2019-04, Firefox 66: paste event exposes clipboard files
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.