Re-enable Paste Protection in Chrome Console: Guide
In this article
To re-enable paste protection in Chrome DevTools, open DevTools (F12 or Ctrl+Shift+I), go to Settings (the gear icon), find the Console section, and turn on "Disable paste protection" (or ensure the paste-protection warning is active). If you previously dismissed the warning or disabled the feature, this restores the safety prompt that appears when you try to paste code into the Console. No special tools are required beyond Chrome and access to DevTools.
What You'll Need
- Google Chrome (or a Chromium-based browser like Edge) on desktop — the paste-protection setting is not available on mobile Chrome.
- Access to DevTools (press F12 or Ctrl+Shift+I / Cmd+Option+I on Mac).
- Basic familiarity with the Console tab.
Step-by-Step
- Open DevTools. With Chrome active, press F12 (Windows/Linux) or Cmd+Option+I (Mac). Alternatively, right-click anywhere on a page and choose "Inspect." The DevTools panel opens, usually docked to the right or bottom.
- Go to the Console tab. Click the "Console" tab at the top of the DevTools panel. If you don't see it, click the double-arrow (» ) overflow menu to find it.
- Open DevTools Settings. Click the gear icon (⚙) in the top-right corner of the DevTools panel, or press F1 while DevTools is focused. The Settings pane opens.
- Find the Console section. In the left sidebar of Settings, scroll down and click "Console." (In some versions, it's under "Preferences" > "Console.")
- Locate the paste-protection option. Look for a checkbox labeled "Disable paste protection" or "Show paste protection warning." The exact wording may vary slightly by Chrome version. If the box is checked, paste protection is disabled — uncheck it to re-enable. If it's unchecked, protection is already on.
- Close Settings. Click the X or press Esc to return to the Console. The change takes effect immediately.
- Test it. Copy some text (e.g., "1+1"), click into the Console prompt, and press Ctrl+V (or Cmd+V). A warning should appear: "Warning: Don't paste code into the DevTools Console that you don't understand..." with a "Allow pasting" link. This confirms paste protection is active.
Common Mistakes
- Looking in the wrong settings location. Paste protection is under DevTools Settings > Console, not Chrome's main Settings (chrome://settings).
- Confusing the warning with an error. The paste-protection message is a safety prompt, not a bug. Typing "allow pasting" manually (not pasting it) is required to proceed.
- Expecting the setting on mobile. Chrome for Android/iOS does not include DevTools, so paste protection cannot be enabled there.
- Assuming the setting persists across profiles. DevTools settings are per Chrome profile; if you switch profiles, you may need to re-enable it.
Tips
- If you frequently paste code, consider keeping paste protection on and using the "Allow pasting" prompt each session — it's a deliberate safeguard against malicious code.
- You can also toggle paste protection by typing
allow pastingdirectly into the Console when prompted; this only affects the current session. - To reset all DevTools settings to default, go to Settings > Preferences and click "Restore defaults to normal." This will re-enable paste protection if it was disabled.
- Keyboard shortcut F1 opens DevTools Settings quickly when DevTools is focused.
Troubleshooting
- The checkbox is missing. Ensure you're in DevTools Settings (gear icon), not Chrome's main settings. If still missing, update Chrome to the latest version — older versions may label it differently.
- Warning doesn't appear after enabling. Close and reopen DevTools, or restart Chrome. Also check that you're not in a special context (e.g., a Chrome internal page) where the Console behaves differently.
- Setting won't stick. DevTools settings are stored per profile. If you're using a guest profile or incognito window, settings may not persist. Sign in to Chrome with your profile and try again.
- You see "Allow pasting" but typing it doesn't work. Type the phrase exactly as shown (lowercase, no quotes) and press Enter. If it still fails, try disabling other extensions that might interfere, or reset DevTools settings.
Frequently Asked Questions
What is paste protection in Chrome Console?
It's a safety feature that warns you before pasting code into the DevTools Console, helping prevent self-XSS attacks where malicious code is pasted and executed.
Why did paste protection disappear?
You may have previously checked "Disable paste protection" in DevTools Settings, or reset DevTools settings. Re-enable it via Settings > Console.
Can I enable paste protection on Chrome for Android?
No, Chrome for Android does not include DevTools, so paste protection is not available on mobile.
Does paste protection block all pasting?
No, it only shows a warning the first time you paste in a session. You can proceed by typing "allow pasting" manually.
Will re-enabling paste protection affect my other DevTools settings?
No, it only toggles the paste warning. Other settings remain unchanged.
How do I disable paste protection again?
Go back to DevTools Settings > Console and check "Disable paste protection."