← Back to Blog

Developers & Code | Published Aug 21, 2026 | Updated Oct 13, 2026 | 6 min read

How to Paste Into Windows Terminal Safely

By Deepender Yadav

How to Paste Into Windows Terminal Safely — Edge Drop Guide

To paste into Windows Terminal, press Ctrl+V, Ctrl+Shift+V or Shift+Insert, or right-click when no text is selected. The terminal pastes plain text only, so fonts and colours never come through, but every character does, including line breaks. In most shells a line break runs the line, so a multi-line paste can execute commands immediately. Keep Windows Terminal's multi-line paste warning on, and check commands copied from the web before you confirm.

Paste shortcuts in Windows Terminal

ActionDefault shortcut
PasteCtrl+V, Ctrl+Shift+V or Shift+Insert
Paste with the mouseRight-click (when nothing is selected)
Copy selected textCtrl+C, Ctrl+Shift+C, Ctrl+Insert or Enter

Ctrl+C copies only when text is selected. With no selection, Windows Terminal passes it to the shell as usual, so it still interrupts a running command.

Programs running inside the terminal can need Ctrl+V for themselves. Vim, for example, uses it for block selection. Microsoft's documentation shows how to unbind Ctrl+V in Windows Terminal's settings.json so the program receives it; Ctrl+Shift+V and Shift+Insert still paste.

If right-click opens a menu instead of pasting, the experimental context-menu setting is on. If you turned on copyOnSelect, selecting text copies it immediately and right-click always pastes.

Why a paste can run commands

The terminal sends pasted text to the shell as if you'd typed it. A line break in the pasted text works like pressing Enter, so:

  • a copied command that ends with a line break runs as soon as you paste it,
  • a multi-line paste can run several commands one after another.

That matters most with commands copied from web pages, chat or documentation, where you can't see a trailing line break. Windows Terminal has two warnings for exactly this:

Setting (in settings.json)DefaultWhat it does
multiLinePasteWarningtrueAsks before pasting text that contains more than one line
largePasteWarningtrueAsks before pasting more than 5 KiB of text
trimPastetrueRemoves trailing whitespace from pasted text

Leave both warnings on. When the multi-line dialog appears and you expected one line, cancel and check the text. Microsoft's own documentation says the warning is useful if you often copy commands from untrusted websites.

Check a command before you paste it

For anything destructive, or anything copied from a source you don't know:

  1. Paste it into a text editor such as Notepad or VS Code first.
  2. Read the whole command, including anything past the edge of the screen.
  3. Remove trailing blank lines, and replace curly quotes and long dashes with straight quotes and hyphens.
  4. Copy it again and paste it into the terminal.
  5. Read it at the prompt before pressing Enter.

Never paste a command you don't understand into an administrator terminal.

See the hidden characters in PowerShell

To see exactly what's on the clipboard before pasting, PowerShell 7 can show it in hexadecimal:

Get-Clipboard -Raw | Format-Hex

Look for 0D 0A (a line break) at the end, E2 80 9C or E2 80 9D (curly double quotes), E2 80 93 (an en dash) and C2 A0 (a non-breaking space). This only reads the clipboard; it doesn't change it.

Characters that break pasted commands

Text copied from documents, chat apps and web pages can contain characters that look right but aren't:

SourceWhat to look for
Word, Outlook, Google DocsCurly quotes, en and em dashes in place of - and --
Web pages and blog code blocksNon-breaking spaces, soft hyphens
ExcelTabs between cells, currency symbols, a trailing line break
Slack and TeamsLine breaks added where the message wrapped

A command such as git commit -m "fix" fails if the quotes are curly, and --force stops being a flag if it became an em dash. To reuse a longer message, skip -m altogether; copying and reusing a git commit message shows git commit -C and keeps the line breaks. How to turn off smart quotes in Word explains where these characters come from, and how to copy a number without the currency symbol covers values copied from Excel.

Pasting into WSL and other shells

In a WSL tab, paste works the same way, because Windows Terminal handles the paste and sends the text to the Linux shell. The multi-line warning applies there too. For anything longer than a few lines, save it as a script file and run the file rather than pasting it. If the script was written in a Windows editor, save it with Unix (LF) line endings; bash can fail on Windows (CRLF) line endings with errors that mention

apos;\r'. VS Code shows the line-ending type in its status bar and lets you switch it. WSL clipboard: what crosses into Windows covers copying in the other direction.

Keep secrets out of clipboard history

Commands often contain tokens, passwords or connection strings. If Windows clipboard history is on, every copy also lands in Win+V, and pinned items survive a restart. After copying a secret, open Win+V and delete it, or clear history from Settings > System > Clipboard > Clear clipboard data. Leave Clipboard history across your devices off on machines you use for admin work. Is an API key on the clipboard a security incident? explains what to do if a key leaks.

FAQ

Why does Ctrl+V type ^V in my terminal?

The program or the terminal you're using doesn't bind Ctrl+V to paste. In Windows Terminal, use Ctrl+Shift+V, Shift+Insert or right-click.

How do I turn off the multi-line paste warning?

Set "multiLinePasteWarning": false at the top level of Windows Terminal's settings.json. It's safer to leave it on.

Why does copied text from Windows Terminal paste with colours elsewhere?

That's controlled by the copyFormatting setting, which is off by default. How to copy from Windows Terminal without garbled text covers the copy side.

Related reading

Sources

Deepender Yadav
Written by Deepender Yadav · Creator & Developer

Deepender Yadav created Edge Drop and builds and tests it, from the edge-hover shelf to each release. A B.Tech Computer Science Engineering student, Deepender writes the Edge Drop guides, comparisons and developer posts, and checks product details against the app's source code.

GitHub · LinkedIn

Copy. Stack. Drop.

Transform your clipboard into an interactive edge shelf. Stack, pin, and drag assets into any app with zero friction.

Download for Windows Get from Microsoft Store

How to Install Guide · First 10 Minutes Guide · Drag & Drop Guide · Edge Drop vs Win+V · Support

Free · Lightweight · Privacy First
Find us on CodeHype