Mahope tools: EUComply Clean Copy DeskUptime Transmute BugBottle All tools
DEVELOPER · VSCODE · MARKDOWN

Paste as Markdown
in VS Code

Copy something from the web, paste it into your notes or README — and get a wall of <span> tags instead of clean Markdown. Here is why it happens, what VS Code can do about it on its own, and the fastest way to fix it properly.

Updated August 2026 · 5 minute read

Why pasting into VS Code makes a mess

When you copy from a web page, the clipboard holds the page's full HTML fragment — inline styles, spans, smart quotes, tracking attributes. What happens on paste depends on where you land:

Into a .md file

VS Code inserts the raw HTML verbatim. Markdown renderers tolerate some inline HTML, so nothing errors — but your clean document fills up with <p style="..."> noise that is painful to edit later.

Into source code

Smart quotes and non-breaking spaces are invisible in the editor but break string literals, YAML values and regexes at runtime. Classic source of "works on my machine".

Into commit messages or docs

Hidden markup bloats diffs and makes documentation inconsistent with hand-written Markdown around it.

The fix is to convert the clipboard between copy and paste — ideally with one keyboard shortcut, without leaving the editor.

Your options today

OptionWhat it doesCatch
Built-in paste Inserts clipboard as-is (rich HTML kept when target accepts it) No conversion at all — the whole problem
Paste as plain text Strips all formatting via the command palette (Paste as plain text) Loses everything — no headings, no links, no lists
Manual cleanup Paste, then find-and-replace the worst offenders Slow, error-prone, different every time
Clean Copy for VS Code Converts clipboard HTML to proper Markdown or spotless plain text on paste Free extension install — one time

The fix: Clean Copy for VS Code

Clean Copy brings the converter behind the Clean Copy browser extension into your editor. Same core, same output — so text you copy to research and text you paste into docs behave identically.

  1. Install the extension (see the Clean Copy page for the current install options).
  2. Copy any content from the web.
  3. In VS Code, press Ctrl+Shift+V (Cmd+Shift+V on Mac) — the clipboard lands as clean Markdown.
  4. Want zero formatting instead? Run Clean Copy: Paste as Clean Text from the command palette.
  5. Already typed something messy? Select it and run Clean Copy: Convert Selection to Markdown.

# Headings preserved

H1–H6 map to the right number of # characters, so document structure survives the trip.

Links become standard Markdown references with the original URL — no relative-path surprises.

Tables → pipe tables

Simple HTML tables convert to Markdown pipe tables, including alignment.

Local only

Conversion happens inside the editor. Nothing is uploaded, nothing is tracked.

Want to see the same engine before installing anything? It also runs in the browser, right here in this page:

Check any page for GDPR & cookie issues: Run the Free Scanner →
EAA, NIS2 and GDPR — three free guides that answer it, and a scanner for any public URL: See what we publish free →

The VS Code extension in this guide is free. Pro is for the two jobs a single paste shortcut does badly.

Everything in this guide — the install, the paste shortcut, the convert-selection command, the plain-text mode — is free, and it stays free: no account, no key, no expiry, and no limit on what you paste. If your workflow is copy in VS Code, paste in VS Code, you never need to pay for anything.

What one editor shortcut cannot do is the work that happens before you reach the editor: collecting pages, stripping a site's inline styles, and converting a pile of snippets in one go. Pro covers the web tool and the browser extension, and adds the two things that actually cost you time there — converting a whole batch of pasted snippets at once, and cleanup rules you write once and reuse everywhere.

What you getFreeClean Copy Pro — $19/year
The VS Code extension in this guideincluded, forever — paste as Markdown, paste as clean text, convert selectionincluded
Conversion modes in the extension and on the web toolevery conversion mode in the extension and on the web toolincluded
How much text you can convertno limit on how much text you pasteincluded
Many snippets at once, one per line—batch conversion on the web tool
Your own cleanup rules, defined once—custom cleanup rules in the browser extension
Devices covered by one licence—5

One licence covers 5 machines or installs. If the editor shortcut already does everything you need — and for most documentation work it does — the free version is the whole answer, and it is not a trial.

Buy Clean Copy Pro — $19/year

Frequently asked questions

Can VS Code paste HTML as Markdown?

Not natively. Pasting rich text into a Markdown file inserts raw HTML tags. You need an extension such as Clean Copy for VS Code, which converts the clipboard HTML to Markdown (Ctrl/Cmd+Shift+V) before it lands in your editor.

What is the shortcut to paste without formatting in VS Code?

By default there is none. With Clean Copy installed, Ctrl+Shift+V (Cmd+Shift+V on Mac) pastes the clipboard as clean Markdown, and the command palette offers a paste-as-plain-text command as well.

Yes. Headings map to # levels, links become [text](url), lists stay lists, bold and italic survive, code blocks become fenced blocks, and simple tables convert to pipe tables.

Does anything get uploaded to a server?

No. Clean Copy runs entirely inside your editor. The clipboard content is converted locally and never leaves your machine.

Free e-book: Build Your First Chrome Extension

The complete guide is available as a free EPUB — no signup required.

Get the free e-book →

Want all six guides? Complete EU Compliance Bundle — all six listed together, each a free EPUB.

Keeping websites online? DeskUptime is a free desktop uptime & SSL-expiry monitor for macOS, Linux and Windows.