navigator.clipboard is a read-only property that returns a Clipboard object for reading and writing the system clipboard (MDN) — the entry point to the Clipboard API (copy / paste).
Read the notes below before you rely on this property. Prefer feature detection when support is limited.
Syntax
Use navigator.clipboard. Start with this line.
JavaScript
navigator.clipboard
Call
What it does
navigator.clipboard
Primary signature.
Built into the browser. Read navigator.clipboard on Navigator — no import required.
pasted: Hello from CodeToFun
/* or: paste failed: NotAllowedError */
How It Works
Await readText. Resolves to a string when allowed.
Empty clipboard. MDN: empty / non-text often yields "".
Permission. Browsers may prompt or deny — always catch errors.
User gesture. Prefer a button click for paste actions too.
Compatibility
Browser Support
navigator.clipboard is marked Baseline Widely available on MDN (since March 2020). Secure context is required. Some advanced Clipboard methods still vary.
✓ Baseline · Widely available
Navigator.clipboard
Returns a Clipboard object for async read/write. Prefer writeText/readText; always handle permission failures.
100%Widely available
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
clipboardExcellent
Bottom line: Safe to use on HTTPS for copy/paste UX. Feature-detect, require a user gesture when possible, and catch denials.
Frequently Asked Questions
It is a read-only Navigator property that returns a Clipboard object — the entry point to the Clipboard API for reading and writing the system clipboard (copy, cut, and paste features).
Yes. The Clipboard API is available only in secure contexts (HTTPS or localhost) in supporting browsers.
Call await navigator.clipboard.writeText("hello"). Prefer running it from a user gesture such as a button click so browsers are more likely to allow the write.
Call await navigator.clipboard.readText(). Reading often requires permission and may prompt the user. Handle promise rejections when access is denied.
No. The property is read-only. You use methods on the returned Clipboard object such as writeText() and readText().
No. MDN marks navigator.clipboard as Baseline Widely available. Some advanced methods (for example reading images via read()) can still vary by browser.