When you copy a password, an API key, a credit card number, or any private string, the clipboard keeps it in plain text until the next copy overwrites it. That can be minutes, hours, or forever if you never copy anything else. Any application — browser extension, desktop app, clipboard manager — can read it at any time. This page explains how to empty the clipboard properly, and provides a one-click tool to do it.
→ Use the clipboard cleaner: open Clipboard Inspector, press Ctrl+V to see what's on your clipboard, then click Clear Clipboard. The button overwrites the clipboard with an empty string using the browser's Clipboard API.
Why the clipboard does not clear itself
The system clipboard is a persistent shared-memory slot, not a session-scoped buffer. It retains its contents across:
- Browser tab closes
- Browser restarts
- Application switches (Word, Excel, password manager)
- Lock-screen and sleep cycles
- User sessions on some operating systems
On Windows, the clipboard history feature (Win + V) goes further: it keeps the last 25 entries unless you explicitly disable history or clear it. On macOS there is no built-in history, but third-party clipboard managers (Alfred, Paste, Raycast) often persist everything you copy for weeks. On Android, recent OEM keyboards show a clipboard history panel in the keyboard itself. None of these get cleared by closing a tab.
How to empty your clipboard on each platform
Any modern browser
The fastest universal method: open Clipboard Inspector and click Clear Clipboard. This calls navigator.clipboard.writeText('') under the hood, overwriting the clipboard with an empty string. Any later paste will produce nothing.
Windows 10 / 11
- Press
Win + Vto open clipboard history. - Click the three-dot menu on each entry and choose Delete, or click Clear all at the top.
- To disable history entirely: Settings → System → Clipboard → Clipboard history: Off.
macOS
macOS has no built-in clipboard manager or history. To clear it, copy an empty value — either use the tool on this site, or run from Terminal:
pbcopy < /dev/null If you use a clipboard manager (Alfred, Raycast, Paste, CopyClip), open its history panel separately and clear it there — pbcopy only affects the system clipboard.
iOS / iPadOS
There is no user-visible clipboard UI. To overwrite, copy something harmless (any single character) and let it replace the previous content. On iOS 14+, you will see a banner notifying you of a clipboard paste — use that signal to spot apps reading your clipboard.
Android
Open any text input, long-press, and tap Clipboard (or the clipboard icon in Gboard). Each saved entry has a trash icon. To disable the clipboard entirely on Gboard, open Gboard settings → Clipboard → turn off.
Empty clipboard with JavaScript (for developers)
If you are building a feature that handles sensitive data — a password manager, a copy-OTP button, a secret-sharing tool — you can clear the clipboard programmatically after a grace period:
async function clearClipboard() {
try {
await navigator.clipboard.writeText('')
} catch (err) {
console.warn('Could not clear clipboard:', err)
}
}
// Example: clear 30 seconds after a sensitive copy
document.querySelector('#copy-password').addEventListener('click', async () => {
await navigator.clipboard.writeText(password)
setTimeout(clearClipboard, 30_000)
})Three caveats:
- Requires HTTPS.
navigator.clipboardis only exposed on secure contexts. - Requires a focused document. If the user switches tabs within the 30-second window, the clear will throw. Wrap it in try/catch and consider clearing on
visibilitychangeinstead. - Does not clear OS clipboard history. On Windows, the entry may still be in
Win + Vhistory until the user clears it manually.
What "empty clipboard" actually means
Overwriting with an empty string is the closest thing browsers offer. It is not a "wipe" in the cryptographic sense — the underlying memory may still contain the previous bytes until the OS reclaims the page. For typical threat models (someone accidentally pasting into the wrong window, a screen-sharing session, a non-malicious clipboard manager) this is sufficient. For a hardened threat model (malware on the device) no user-space API can guarantee erasure.
For the full security story including real-world incidents, see Clearing the Clipboard: A Practical Security Guide.